BornANoob[MR]
Member
- Reaction score
- 21
This is the second part of my Hero Arena tutorial, for this you will only need 2 variables, called DeadHeroTimerWindow, it's a timer window array. Aswell as DeadHeroCountdown, which is a timer array (size 13) with an initial value of New Timer (default).
This will tell the players you have died, as well as giving you a message that you will revive soon, it then creates a timer window to show time remaining (30 seconds) then it will revive you hero at desired respawn location. (see 'Whatever') You can choose to show or hide the revival graphics.
Hope this helps.
Code:
Revive Hero
Events
Unit - A unit Dies
Conditions
((Triggering unit) is A Hero) Equal to True
((Owner of (Triggering unit)) Is playing) Equal to True
Actions
Game - Display to (Player group((Owner of (Triggering unit)))) the text: Your hero will be r...
Game - Display to (All enemies of (Owner of (Triggering unit))) the text: (|cffffcc00 + ((Name of (Owner of (Triggering unit))) + |r died.))
Countdown Timer - Create a timer window for DeadHeroCountdown[(Player number of (Owner of (Triggering unit)))] with title (Name of (Owner of (Triggering unit)))
Countdown Timer - Show (Last created timer window)
Set DeadHeroTimerWindow[(Player number of (Triggering player))] = (Last created timer window)
Countdown Timer - Start DeadHeroCountdown[(Player number of (Owner of (Triggering unit)))] as a One-shot timer that will expire in 30.00 seconds
Wait 30.00 seconds
Countdown Timer - Destroy DeadHeroTimerWindow[(Player number of (Triggering player))]
Hero - Instantly revive (Triggering unit) at (Wherever), Show revival graphics
This will tell the players you have died, as well as giving you a message that you will revive soon, it then creates a timer window to show time remaining (30 seconds) then it will revive you hero at desired respawn location. (see 'Whatever') You can choose to show or hide the revival graphics.
Hope this helps.