Help with an Ability

xmkiller

New Member
Reaction score
6
I'm working on this ability but have come across a problem. Heres the tooltip:

Firestorm
The Torch throws his own embers causing a firestorm at the target. As long as the firestorm still brews the effected target will spit out fire to its closest allies, dealing 75 damage. Lasts 10 seconds.

Basically when the spell is cast it creates a dummy target above the target unit and is ordered to follow him around. This dummy is given a phoenix fire type of an ability and a 10 second expiration timer.

Now the problem is that when the unit that is effected with Firestorm dies I would want the dummy unit attached to the unit its following to die aswell. (Note that this ability has a 1 second cooldown, it is 'spamable')


I hope you understand what I'm getting at and I look forward to any suggestions. Thanks.
 

Prediter[BuB

Well-Known Member
Reaction score
35
well u can put the target in a group. then a trigger that states any unit in unit group of type dies. Kill all units of type dummy within 20 distance. That would work would it not?
 

xmkiller

New Member
Reaction score
6
Hmm.. but if there was two effected targets beside each other and one of them dies the other one would too.
 

Jolly chap*

New Member
Reaction score
34
Set the dummy into a Unit Variable (with an array if it is "spammable") and then create a new trigger that has the Event - Unit Dies and check if the unit is the target unit of your spell then kill the Unit Variable (your dummy).
 

xmkiller

New Member
Reaction score
6
Set the dummy into a Unit Variable (with an array if it is "spammable") and then create a new trigger that has the Event - Unit Dies and check if the unit is the target unit of your spell then kill the Unit Variable (your dummy).


Yes, this is what I was thinking of yesterday but I don't understand how I could determine every dummy unit's specific target.

Ie.

Last Created Unit [0]
Last Created Unit [1]
Last Created Unit [2]

So right now there is 3 instances of the spell in progress.

So when 1 of the 3 targets die how will I know which unit died so I can delete the correct array?
 

Jolly chap*

New Member
Reaction score
34
Make an integer variable and then Set it to Integer + 1 and then set Last Created Unit [Integer] and also make a Unit Variable Array for your targeted unit too with [Integer]. If I'm not wrong, Integer will work until 8000++ times and then it won't work anymore because the array has a limit of 8000 something. :)
 

xmkiller

New Member
Reaction score
6
I think i understand what your saying. It seems like your idea should work, ill give it a shot and report back later tonight.

As for the limit thing I can always just reset it when the hero respawns. ^^

Thanks for your help!
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top