Revival countdown

akuzaid93

New Member
Reaction score
3
When a hero killed
Trigger:
  • killed
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Game - Display to (All allies of (Owner of (Triggering unit))) the text: Your Hero will be r...
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 1 (Red)
        • Then - Actions
          • Countdown Timer - Start revival1[0] as a One-shot timer that will expire in revivetime seconds
          • Countdown Timer - Create a timer window for revival1[0] with title (Name of (Triggering unit))
          • Set revivalwin1[0] = (Last created timer window)
          • Wait revivetime seconds
          • Hero - Instantly revive (Triggering unit) at ((Owner of (Triggering unit)) start location), Show revival graphics
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 2 (Blue)
        • Then - Actions
          • Countdown Timer - Start revival1[1] as a One-shot timer that will expire in revivetime seconds
          • Countdown Timer - Create a timer window for revival1[1] with title (Name of (Triggering unit))
          • Set revivalwin1[1] = (Last created timer window)
          • Wait revivetime seconds
          • Hero - Instantly revive (Triggering unit) at ((Owner of (Triggering unit)) start location), Show revival graphics
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 3 (Teal)
        • Then - Actions
          • Countdown Timer - Start revival1[2] as a One-shot timer that will expire in revivetime seconds
          • Countdown Timer - Create a timer window for revival1[2] with title (Name of (Triggering unit))
          • Set revivalwin1[2] = (Last created timer window)
          • Wait revivetime seconds
          • Hero - Instantly revive (Triggering unit) at ((Owner of (Triggering unit)) start location), Show revival graphics
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 4 (Purple)
        • Then - Actions
          • Countdown Timer - Start revival1[3] as a One-shot timer that will expire in revivetime seconds
          • Countdown Timer - Create a timer window for revival1[3] with title (Name of (Triggering unit))
          • Set revivalwin1[3] = (Last created timer window)
          • Wait revivetime seconds
          • Hero - Instantly revive (Triggering unit) at ((Owner of (Triggering unit)) start location), Show revival graphics
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 5 (Yellow)
        • Then - Actions
          • Countdown Timer - Start revival1[4] as a One-shot timer that will expire in revivetime seconds
          • Countdown Timer - Create a timer window for revival1[4] with title (Name of (Triggering unit))
          • Set revivalwin1[4] = (Last created timer window)
          • Wait revivetime seconds
          • Hero - Instantly revive (Triggering unit) at ((Owner of (Triggering unit)) start location), Show revival graphics
        • Else - Actions


When a hero revives
Trigger:
  • revive
    • Events
      • Unit - A unit Finishes reviving
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 1 (Red)
        • Then - Actions
          • Countdown Timer - Destroy revivalwin1[0]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 2 (Blue)
        • Then - Actions
          • Countdown Timer - Destroy revivalwin1[1]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 3 (Teal)
        • Then - Actions
          • Countdown Timer - Destroy revivalwin1[2]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 4 (Purple)
        • Then - Actions
          • Countdown Timer - Destroy revivalwin1[3]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 5 (Yellow)
        • Then - Actions
          • Countdown Timer - Destroy revivalwin1[4]
        • Else - Actions


The thing is that when a player 3,4 and 5 dies, the countdown window comes out but without the countdown timer.
what's wrong?
 

HydraRancher

Truth begins in lies
Reaction score
197
BTW, I think you can optimize the triggers like this:

Trigger:
  • killed
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Game - Display to (All allies of (Owner of (Triggering unit))) the text: Your Hero will be r...
      • Countdown Timer - Start revival1[((Player Number of (Owner of (Triggering Unit))) - 1)] as a One-shot timer that will expire in revivetime seconds
      • Countdown Timer - Create a timer window for revival1[((Player Number of (Owner of (Triggering Unit))) - 1)] with title (Name of (Triggering unit))
      • Set revivalwin1[((Player Number of (Owner of (Triggering Unit))) - 1)] = (Last created timer window)
      • Wait revivetime seconds
      • Hero - Instantly revive (Triggering unit) at ((Owner of (Triggering unit)) start location), Show revival graphics


And,

Trigger:
  • revive
    • Events
      • Unit - A unit Finishes reviving
    • Conditions
    • Actions
      • Countdown Timer - Destroy revivalwin1[((Player Number of (Owner of (Triggering Unit))) - 1)]
 

TomTTT

New Member
Reaction score
44
Why do you have to make the Unit finishes reviving? Is that even count if you revive by triggers? Just make the event Time - Timer expires.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top