Modding Help Healing Projectiles

Discussion in 'Starbound Modding' started by Dakrhunter30, Jan 7, 2018.

  1. Dakrhunter30

    Dakrhunter30 Void-Bound Voyager

    Recently I played a lot of Overwatch in which my favorite Hero is Anna. I really love her Gun which has different effects on allies and enemies
    -Heals allies on hit
    -Poisons enemies on hit
    Now i'm trying to create a Starbound mod for her gun.

    My question is, is it possitble to detect wether the entity hit by the projectile is an ally (other player or npc) or an enemy (monster)?
    If it is could anyone give me an example or references?
     
  2. Dakrhunter30

    Dakrhunter30 Void-Bound Voyager

    In case anyone is interested, I found a solution for this. It may not be the best but it works.

    I created 3projectiles total. One for the impact damage, one for the poison and one for the heal.

    I've set the damageteam of the healing one to enemy, which makes the projectile effect passive Npcs, monster and players but ignores enemies.

    So my gun fires the damaging projectile which "summons" the other two with the same vector (bullet path) and speed.

    The only problem with my solution is that the projectil can heal and poison an enemy at the same time when they are standing behind each other.

    Next up im trying to add the poison/heal to its own status effect.
     
  3. Random_NPC1996

    Random_NPC1996 Void-Bound Voyager

    That I had a mod for that, try my mod? There is a crossbow called crusader's crossbow which almost does the same... heals enemies, hurts enemies (actually can insert some sort of poison in that just I didn't do that).
    It only used 1 projectile for it instead of 3. And will dig into status effect lua files if you're asking how it works
     
    Dakrhunter30 likes this.
  4. Dakrhunter30

    Dakrhunter30 Void-Bound Voyager

    Thanks, i'll take a look at it. :D
     

Share This Page