dyablohunter
New Member
- Reaction score
- 2
Ok i have a spell that revives allied heroes:
What I want to know is how do I make a loop check to see what integer is available for use with the spell, because it only stores the last unit that dies.
Code:
RedemptionTargetAlly
Events
Unit - A unit Dies
Conditions
((Dying unit) is A Hero) Equal to True
((Dying unit) belongs to an ally of Player 1 (Red)) Equal to True
Actions
Set [COLOR="Red"]RedemptionTargetAlly[/COLOR][1] = (Dying unit)
Trigger - Run Ally Rez <gen> (checking conditions)
Game - Display to (All players) the text: ((Name of (Owner of (Dying unit))) + |cffffcc00will be revived in 25 seconds.|r)
Code:
RedemptionAlly
Events
Unit - A unit Finishes casting an ability
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Equal to Redemption [Paladin]
([COLOR="#ff0000"]RedemptionTargetAlly[/COLOR][1] is dead) Equal to True
([COLOR="#ff0000"]RedemptionTargetAlly[/COLOR][1] belongs to an ally of Player 1 (Red)) Equal to True
Then - Actions
Hero - Instantly revive [COLOR="#ff0000"]RedemptionTargetAlly[/COLOR][1] at (Position of (Casting unit)), Show revival graphics
Game - Display to (All players) the text: ((Name of (Owner of [COLOR="#ff0000"]RedemptionTargetAlly[/COLOR][1])) + ( |cffffcc00has been revived by|r + (Name of (Owner of (Casting unit)))))
Else - Actions
Do nothing
Code:
Ally Rez
Events
Conditions
Actions
Wait 25.00 game-time seconds
Hero - Instantly revive [COLOR="#ff0000"]RedemptionTargetAlly[/COLOR][1] at (Center of Ally Hero Spawn <gen>), Show revival graphics
What I want to know is how do I make a loop check to see what integer is available for use with the spell, because it only stores the last unit that dies.