- Joined
- Jan 12, 2014
- Messages
- 64
Hi Everyone , im searching for a good trigger for hero respawn like dota .
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Trigger

Events


Unit - A unit Dies

Conditions


((Triggering unit) is A Hero) Equal to True

Actions


Countdown Timer - Create a timer window for (Last started timer) with title Respawn:


Countdown Timer - Start (Last started timer) as a One-shot timer that will expire in (Real(((Hero level of (Triggering unit)) x (3 + 10)))) seconds


Wait ((Real((Hero level of (Triggering unit)))) x (3.00 + 10.00)) seconds


Countdown Timer - Destroy (Last created timer window)


Hero - Instantly revive (Triggering unit) at (Center of Region<gen>), Show revival graphics
Trigger

Events


Unit - A unit Dies

Conditions


((Triggering unit) is A Hero) Equal to True

Actions


Countdown Timer - Create a timer window for (Last started timer) with title Respawn:


Countdown Timer - Start (Last started timer) as a One-shot timer that will expire in (10.00 + (3.00 x (Real((Hero level of (Triggering unit)))))) seconds


Wait (10.00 + (3.00 x (Real((Hero level of (Triggering unit)))))) seconds


Countdown Timer - Destroy (Last created timer window)


Hero - Instantly revive (Triggering unit) at (Center of Region <gen>), Show revival graphics
If this is fine for you. Easy to change seconds.
Trigger
Events
Unit - A unit Dies
Conditions
((Triggering unit) is A Hero) Equal to True
Actions
Countdown Timer - Create a timer window for (Last started timer) with title Respawn:
Countdown Timer - Start (Last started timer) as a One-shot timer that will expire in (Real(((Hero level of (Triggering unit)) x (3 + 10)))) seconds
Wait ((Real((Hero level of (Triggering unit)))) x (3.00 + 10.00)) seconds
Countdown Timer - Destroy (Last created timer window)
Hero - Instantly revive (Triggering unit) at (Center of Region<gen>), Show revival graphics
This trigger got some problem , when 2 or 3 hero die after each other don't destroy countdown timer ! , for this problem what can i do?
Revive

Events


Unit - A unit Dies

Conditions


((Triggering unit) is A Hero) Equal to True

Actions


Set writeindex = (writeindex + 1)


Countdown Timer - Start timer[writeindex] as a One-shot timer that will expire in 10.00 seconds


Countdown Timer - Create a timer window for timer[writeindex] with title (Name of (Owner of (Triggering unit)))


Set respawninghero[writeindex] = (Triggering unit)


Set timer[writeindex] = (Last started timer)


Wait 10.00 seconds


Set readindex = (readindex + 1)


Countdown Timer - Destroy timerwindow[readindex]


Hero - Instantly revive respawninghero[readindex] at (Center of (Playable map area)), Show revival graphics


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




readindex Equal to writeindex



Then - Actions




Set readindex = 0




Set writeindex = 0



Else - Actions
Countdown Timer - Show (Last created timer window) for (Picked Player)
Custom script: call DestroyForce(udg_>>>Variable of the AllPlayer<<<)
TriggerSleepAction in making respawn trigger. You need to use Timers for such task, so different heroes can revive at different times (unless you want heroes to revive in short amount of time and don't have different amount of time based on levels). If I recall it right, Dota uses timer, that's why it's pretty accurate.lastly, I do know that you shoulddestroy it with this to avoid memory leaks:
Custom script: call DestroyForce(udg_>>>Variable of the AllPlayer<<<)
Maybe I misunderstand Hell_Master a bit, but if you use "All Players" --> never destroy the force.. it doesnt leak, and if you would destroy All Players, the game may be bugged.
As far as I know that will show for ALL players but if incase it wont, you can show it by picking all players (suggested to store All player into a variable trigger) then in the loop, place this:
lastly, I do know that you shoulddestroy it with this to avoid memory leaks:
Countdown Timer - Show (Last created timer window) for (Picked Player)
But just store the Last Created Timer Window into a variable which is better.
Custom script: call DestroyForce(udg_>>>Variable of the AllPlayer<<<)
EDIT: You need to show it first with a timer window by Show Timer trigger.
Revive

Events


Unit - A unit Dies

Conditions


((Dying unit) is A Hero) Equal to True

Actions


Countdown Timer - Create a timer window for (Last started timer) with title Respawn:


Countdown Timer - Show (Last created timer window) for (Owner of (Triggering unit))


Countdown Timer - Start (Last started timer) as a One-shot timer that will expire in (Real(((Hero level of (Triggering unit)) + 15))) seconds


Wait (Real(((Hero level of (Triggering unit)) + 15))) seconds


Countdown Timer - Destroy (Last created timer window)


Hero - Instantly revive (Triggering unit) at (Center of RED Revive <gen>), Show revival graphics
