Hey guys, I'm trying to make a leaderboard appear for the player of when his hero dies. I'm using a leaderboard because it will only show for the player of the dying unit and it appears below the multiboard.
The problem is, is that I can't get it to countdown from 20 to 1 for the respawn timer, and changing the time on the leaderboard...
How do I make a working countdown timer?
The problem is, is that I can't get it to countdown from 20 to 1 for the respawn timer, and changing the time on the leaderboard...
How do I make a working countdown timer?
-
Actions
- Game - Display to (All players) for 20.00 seconds the text: (S_PlayerColourCodes[(Player number of (Owner of (Dying unit)))] + ((Name of (Owner of (Dying unit))) + |r has died.))
- Leaderboard - Create a leaderboard for (Player group((Owner of (Dying unit)))) titled Respawn in 21 secon...
- Set LB_RespawnTimer[(Player number of (Owner of (Dying unit)))] = (Last created leaderboard)
- Leaderboard - Change the title of LB_RespawnTimer[(Player number of (Owner of (Dying unit)))] to Respawn in 20 secon...
- Set I_LB_RespawnTime[(Player number of (Owner of (Dying unit)))] = 20
-
For each (Integer I_LB_RespawnTime[(Player number of (Owner of (Dying unit)))]) from I_LB_RespawnTime[(Player number of (Owner of (Dying unit)))] to 1, do (Actions)
-
Loop - Actions
- Leaderboard - Change the title of LB_RespawnTimer[(Player number of (Owner of (Dying unit)))] to (Respawn in + ((String(I_LB_RespawnTime[(Player number of (Owner of (Dying unit)))])) + seconds...))
- Set I_LB_RespawnTime[(Player number of (Owner of (Dying unit)))] = (I_LB_RespawnTime[(Player number of (Owner of (Dying unit)))] - 1)
- Wait 1.00 seconds
-
Loop - Actions
- Leaderboard - Destroy LB_RespawnTimer[(Player number of (Owner of (Dying unit)))]
- Hero - Instantly revive (Dying unit) at P_Regions[1], Show revival graphics
- Camera - Pan camera for (Player((Player number of (Owner of (Dying unit))))) to (Position of U_Hero[(Player number of (Owner of (Dying unit)))]) over 0.00 seconds
- Selection - Select U_Hero[(Player number of (Owner of (Dying unit)))] for (Owner of (Dying unit))