Help with ability

PandaBear

New Member
Reaction score
3
I'm trying to make an ability that when the user casts it, it creates lots of footmans that will go straight to the targeted unit. When the footmans touch the targeted unit, they deal damage and then die. I can't figure out how to make the created footmans attack the targeted unit. How can I make this work?
 

PandaBear

New Member
Reaction score
3
Thanks! It works great now.

But I've got another question: the ability makes my hero send waves of footmans to the target. But if the target dies the units stop. What can I do to remove them from the game?
 

kingkwong92

Well-Known Member
Reaction score
25
Save the target unit as a variable
Save created units in a unit group
when the target dies
Remove the units in the unit group:thup:
 

PandaBear

New Member
Reaction score
3
Thanks :thup:

Edit - now another problem showed up: I'm storing the target of the ability inside a variable and then I created a trigger that runs when a unit dies, with the condition dying unit is the target to remove all the units created by the spell. But the units are being removed without the target's death. What's wrong?
 

Nenad

~Choco Coronet~ Omnomnom
Reaction score
137
Can you show us the triggers?

And it may work if you do something like:

Unit target of ability being cast dies > Run Remove Footman Trigger (Ignoring Conditions) ^^
 

PandaBear

New Member
Reaction score
3
It didn't work properly and i got pissed so i deleted it :(

I was trying to do an ability just like in the RoC hero line wars, where a hero (I don't remeber which one) throwed lots of Shades on a target...
 

Sacred_Tear

New Member
Reaction score
1
Why do you have to run a trigger at all? Create the trigger itself

Trigger:
  • Events
    • Unit - A unit dies
    • Conditions
      • (Unit-type of (triggering unit)) equal to <your unit>
    • Actions
      • Unit Group - Pick every unit in <Your Group Variable> and do
        • loop actions
          • Unit - kill (picked unit) // you can also set them to "remove (picked unit)" (which is kinda neater considering its a spell)



Just a side note. This spell is not MUI if you have multiple units with the same ability.
 

jig7c

Stop reading me...-statement
Reaction score
123
also in the above trigger put the following action line

Trigger:
  • custom script: call DestroyGroup (udg_Your_Group_Variable)
 

Jim_skarrj

New Member
Reaction score
2
you can also use the abilty "Stampede" and change the graphic to the footmen unit, for a easier and messier way of doing it.

stampede isnt the best skill to work with.
 
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