Bananarama1
Member
- Reaction score
- 3
I am attempting to incorporate a respawn timer into my map which starts whenever a player's hero dies. This timer should only be shown for the owner of the hero that has did.
This is my trigger:
timer
Events
Unit - A unit Dies
Conditions
(Unit-type of (Triggering unit)) Equal to Survivor
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 - Start timer_Copy as a One-shot timer that will expire in 20.00 seconds
Countdown Timer - Create a timer window for timer_Copy with title Survivor Respawn:
Countdown Timer - Show (Last created timer window) for Player 1 (Red)
Countdown Timer - Change the color of the title for mytimerwindow_Copy to (100.00%, 100.00%, 50.00%) with 0.00% transparency
Wait 20.00 seconds
Countdown Timer - Destroy mytimerwindow_Copy
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 timer_Copy_2 as a One-shot timer that will expire in 20.00 seconds
Countdown Timer - Create a timer window for timer_Copy_2 with title Survivor Respawn:
Countdown Timer - Show (Last created timer window) for Player 2 (Blue)
Countdown Timer - Change the color of the title for mytimerwindow_Copy_2 to (100.00%, 100.00%, 50.00%) with 0.00% transparency
Wait 20.00 seconds
Countdown Timer - Destroy mytimerwindow_Copy_2
Else - Actions
This carries on for the rest of the players. For some reason, this trigger shows the timer when a hero dies to ALL players, no matter who the owner was. So for example, if the player 1 killed a hero from player 2's side, the timer for the respawn of that hero would be shown to every player, and not just player 2. Does anyone know why this might be happening? Thanks in advance!
This is my trigger:
timer
Events
Unit - A unit Dies
Conditions
(Unit-type of (Triggering unit)) Equal to Survivor
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 - Start timer_Copy as a One-shot timer that will expire in 20.00 seconds
Countdown Timer - Create a timer window for timer_Copy with title Survivor Respawn:
Countdown Timer - Show (Last created timer window) for Player 1 (Red)
Countdown Timer - Change the color of the title for mytimerwindow_Copy to (100.00%, 100.00%, 50.00%) with 0.00% transparency
Wait 20.00 seconds
Countdown Timer - Destroy mytimerwindow_Copy
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 timer_Copy_2 as a One-shot timer that will expire in 20.00 seconds
Countdown Timer - Create a timer window for timer_Copy_2 with title Survivor Respawn:
Countdown Timer - Show (Last created timer window) for Player 2 (Blue)
Countdown Timer - Change the color of the title for mytimerwindow_Copy_2 to (100.00%, 100.00%, 50.00%) with 0.00% transparency
Wait 20.00 seconds
Countdown Timer - Destroy mytimerwindow_Copy_2
Else - Actions
This carries on for the rest of the players. For some reason, this trigger shows the timer when a hero dies to ALL players, no matter who the owner was. So for example, if the player 1 killed a hero from player 2's side, the timer for the respawn of that hero would be shown to every player, and not just player 2. Does anyone know why this might be happening? Thanks in advance!