Modding Help Projectiles giving no craps about what they hit

Discussion in 'Starbound Modding' started by Taffy Charamile, May 28, 2018.

Tags:
  1. Taffy Charamile

    Taffy Charamile Scruffy Nerf-Herder

    The title says it all...

    Instead of fiddling with the gunfire lua, I'm using an invisibleprojectile that spawns 4 bullets at specific angles to get a quad shotgun effect.

    Normally I'd just spawn 4 bullets with 0.2 inaccuracy but this weapons needs that specific spread.

    The problem is, the resulting spawns don't seem to care what it is that they hit... They're even hitting the person firing the weapon. I know I could just change the muzzle offset, but these projectiles bounce and you'd kill yourself if you shoot at a wall.

    I'm thinking it has to do with the invisibleprojectile.... How do I fix this?

    I can't provide code because I'm not typing this from my computer, so I described as much as I could. Sorry!

    EDIT:
    ...so invisibleprojectiles deal damage apparently. And have large hitboxes for some reason. Whoops.


     
    Last edited: May 28, 2018
  2. PistolRcks

    PistolRcks Void-Bound Voyager

    There was one REALLY janky way I did this for a bit of a joke mod a little while back (I haven't uploaded the mod though...), so here goes. (N.B. I did this with a throwable, so your mileage may vary.) Turns out you don't actually need an invisible projectile. It should work if you change the "projectileConfig" to "projectileParameters"... I think. Anyway, here it is:
    Code:
    "projectileConfig" : {
        "periodicActions" : [
          {
            "time" : 0,
            "repeat" : false,
            "action" : "projectile",
            "type" : "<projectile name>",
            "angleAdjust" : 5
          },
          {
            "time" : 0,
            "repeat" : false,
            "action" : "projectile",
            "type" : "<projectile name>",
            "angleAdjust" : -5
          },
          {
            "time" : 0,
            "repeat" : false,
            "action" : "projectile",
            "type" : "<projectile name>",
            "angleAdjust" : 10
          },
          {
            "time" : 0,
            "repeat" : false,
            "action" : "projectile",
            "type" : "<projectile name>",
            "angleAdjust" : -10
          }
        ]
      }
    Not sure if this'll work, but hey, it's worth a shot.
     

Share This Page