P
polymorph
Guest
how do you right a script that every 15 seconds the trigger attempts to revive all heroes that are currently dead
Revive Heros
Events
Time - Every 15.00 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is dead) Equal to True
Then - Actions
Hero - Instantly revive (Picked unit) at (Center of (Playable map area)), Show revival graphics
Else - Actions
i did everything above this point but how do you add a loop and theAgentPaper said:dont need variables or anything...
Code:(((Matching unit) is A Hero) Equal to True)) and do (Actions) Loop - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions ((Picked unit) is dead) Equal to True Then - Actions Hero - Instantly revive (Picked unit) at (Center of (Playable map area)), Show revival graphics Else - Actions
A hero dies
Events
A unit dies
Conditions
((Dying unit) is A Hero) Equal to True
Actions
Unit Group - Add (Dying unit) to (ugDeadHeroes)
Bring heroes to life
Events
Time - Every 15.00 seconds of game time
Conditions
None
Actions
Unit Group - Pick every unit in (ugDeadHeroes) and do
Hero - Instantly revive (Picked unit) at (Any area), Show revival graphics
Unit Group - Remove all units from (ugDeadHeroes)