I have respawn code that kinda works if someone could help me with that at the same time.
I need Gollum to spawn in 1 out of 8 regions when he dies or is captured. Also a problem with my respawn timers. The timer window doesnt go away after the hero respawns. Thanks guys
I need Gollum to spawn in 1 out of 8 regions when he dies or is captured. Also a problem with my respawn timers. The timer window doesnt go away after the hero respawns. Thanks guys
Trigger:
- Revive Hero
- Events
- Unit - A unit Dies
- Conditions
- ((Dying unit) is A Hero) Equal to True
- Actions
- Unit Group - Add (Dying unit) to RevivableHeroes
- Set TempReal = 20.00
- Countdown Timer - Start ReviveTimers[(Player number of (Owner of (Dying unit)))] as a One-shot timer that will expire in TempReal seconds
- -------- Seperate --------
- Countdown Timer - Create a timer window for (Last started timer) with title (Name of (Owner of (Dying unit)))
- Countdown Timer - Show (Last created timer window) for (Owner of (Dying unit))
- Set RevivableTimersWindows[(Player number of (Owner of (Dying unit)))] = (Last created timer window)
- Events
Trigger:
- Revive Hero Timer
- Events
- Time - ReviveTimers[1] expires
- Time - ReviveTimers[2] expires
- Time - ReviveTimers[3] expires
- Time - ReviveTimers[4] expires
- Time - ReviveTimers[5] expires
- Time - ReviveTimers[6] expires
- Time - ReviveTimers[8] expires
- Time - ReviveTimers[9] expires
- Time - ReviveTimers[10] expires
- Time - ReviveTimers[11] expires
- Conditions
- Actions
- Unit Group - Pick every unit in RevivableHeroes and do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Remaining time for ReviveTimers[(Player number of (Owner of (Picked unit)))]) Less than 1.00
- Then - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ((Owner of (Picked unit)) is in PlayersRangers) Equal to True
- Then - Actions
- Hero - Instantly revive (Picked unit) at (Center of Rangers Spawn <gen>), Show revival graphics
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ((Owner of (Picked unit)) is in PlayersOrcs) Equal to True
- Then - Actions
- Hero - Instantly revive (Picked unit) at (Center of Orc Trackers Spawn <gen>), Show revival graphics
- Else - Actions
- Hero - Instantly revive (Picked unit) at (Center of Gollum Spawn 1 <gen>), Show revival graphics
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- Unit Group - Pick every unit in RevivableHeroes and do (Actions)
- Events