K
Keiga
Guest
I am trying to make an ability that takes control of units in an area for a certain amount of seconds and for each one controlled the caster loses 10% of his max life. Here are my triggers.
For this one, I am able to take control, but it doesn't change back to the owner after the wait time.
For this one nothing happens when the unit changes.
Please what are my mistakes? thanks
Code:
Tidal Control
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Tidal Control
Actions
Set Targetedpoint = (Target point of ability being cast)
Unit Group - Pick every unit in (Units within 800.00 of Targetedpoint matching ((((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True) and ((((Matching unit) is A Hero) Equal to False) and (((Matching unit) is A structure) Equal to False)))) and do (Actions)
Loop - Actions
Unit - Change ownership of (Picked unit) to (Owner of (Casting unit)) and Change color
Set Unit = (Picked unit)
Set PLAYER = (Owner of Unit)
Wait 1.00 seconds
Unit - Change ownership of Unit to PLAYER and Change color
Code:
Wid
Events
Unit - A unit Changes owner
Conditions
((Ownership-changed unit) belongs to an enemy of (Owner of Legendary Tidal Dragon 0000 <gen>)) Equal to True
Actions
Unit - Set life of Legendary Tidal Dragon 0000 <gen> to ((Max life of Legendary Tidal Dragon 0000 <gen>) - ((Max life of Legendary Tidal Dragon 0000 <gen>) / 10.00))
Unit - Set mana of Legendary Tidal Dragon 0000 <gen> to ((Max mana of Legendary Tidal Dragon 0000 <gen>) - ((Max mana of Legendary Tidal Dragon 0000 <gen>) / 10.00))
Please what are my mistakes? thanks


