I am posting an early draft of my concept of a revival system for heroes. Testing showed heroes are revived in correct time, both by computer and user players (with a small condition change).
EDIT: The triggers have been updated to prevent leaks and is now working. Thank you for your suggestions!
EDIT#2: Triggers have been finalized and reduced as much as I can. Thanks to all the people that helped!
-
Revival System 1 Copy
-

Events
-


Map initialization
-
-

Conditions
-

Actions
-


Hashtable - Create a hashtable
-


Set Respawn_Table = (Last created hashtable)
-


Set Revive_Region = (Center of Hero Relocate <gen>)
-


Set Active_Players = (All players controlled by a User player)
-
-
-
Revival System 2 Copy
-

Events
-


Unit - A unit Dies
-
-

Conditions
-


((Dying unit) is A Hero) Equal to True
-
-

Actions
-


Set Dying_Hero = (Triggering unit)
-


Set Player = (Triggering player)
-


Set Player_Number = (Player number of Player)
-


Hashtable - Save 1 as 1 of Player_Number in Respawn_Table
-


Hashtable - Save ((Hero level of Dying_Hero) x 2) as 2 of Player_Number in Respawn_Table
-


Hashtable - Save Handle OfDying_Hero as 3 of Player_Number in Respawn_Table
-
-
-
Revival System 3 Copy
-

Events
-


Time - Every 1.00 seconds of game time
-
-

Conditions
-

Actions
-


Player Group - Pick every player in Active_Players and do (Actions)
-



Loop - Actions
-




Set Integer_A = (Player number of (Picked player))
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Load 1 of Integer_A from Respawn_Table) Equal to 1
-
-





Then - Actions
-






Hashtable - Save ((Load 2 of Integer_A from Respawn_Table) - 1) as 2 of Integer_A in Respawn_Table
-
-





Else - Actions
-
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Load 2 of Integer_A from Respawn_Table) Equal to 0
-
-





Then - Actions
-






Hashtable - Save 0 as 1 of Integer_A in Respawn_Table
-






Hero - Instantly revive (Load 3 of Player_Number in Respawn_Table) at Revive_Region, Show revival graphics
-
-





Else - Actions
-
-
-
-
-
EDIT: The triggers have been updated to prevent leaks and is now working. Thank you for your suggestions!
EDIT#2: Triggers have been finalized and reduced as much as I can. Thanks to all the people that helped!
Last edited:



