Custom Spell, Flame Arrow not triggering Properly

Slayerxx

You can change this now in User CP.
Reaction score
3
Ok so i have a custom spell moulded off black arrow, so when a unit dies (by Flame Arrow) it creats a small flame strike controlled by triggers other then spell data. in saying this im having trouble geting it to trigger it properly this is the trigger here:

Trigger:
  • FA 1
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Level of Flame Arrow for (Killing unit)) Equal to 1
      • ((Dying unit) has buff Flame Arrow ) Equal to True
    • Actions
      • Set TempPoint = (Position of (Dying unit))
      • Set Tempgroup = (Units within 75.00 of TempPoint matching ((Owner of (Matching unit)) Equal to Neutral Hostile))
      • Special Effect - Create a special effect at TempPoint using Abilities\Spells\Human\FlameStrike\FlameStrike1.mdl
      • Wait 0.67 seconds
      • Unit Group - Pick every unit in Tempgroup and do (Unit - Cause (Killing unit) to damage (Picked unit), dealing 40.00 damage of attack type Spells and damage type Fire)
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call DestroyGroup (udg_Tempgroup)
      • Custom script: call RemoveLocation (udg_TempPoint)



When i have the condition ((Dying unit) has buff Flame Arrow ) Equal to True it will not trigger and when i remove it it will trigger but then send the effect around all the units? help.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
when a unit dies it no longer has any buffs, thats why, you should add the units with the buff to a group when they recieve it, then remove them 0.01 seconds after they die (0.1 seconds so that the death trigger still fires) and remove them if they lose the buff, then have the boolean condition: Unit is Group Your group is equal to true
 

NotInTheFace

Member
Reaction score
17
You can also detect when a unit is about to die by using an ability based on Spawn Hydra. It will fire when the unit is killed (even if it has a reincarnation ability), but before the buffs are removed.

Of course, since you want to spawn a unit when another unit is killed, you could just add a custom Spawn Hydra ability when the unit gets attacked, then remove it after a time.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top