Hey, I copied a tutorial on how to create revive timer windows for dead heroes.
http://world-editor-tutorials.thehelper.net/revive.php
Heres my trigger:
http://world-editor-tutorials.thehelper.net/revive.php
Heres my trigger:
-
Revive Hero
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
((Triggering unit) is A Hero) Equal to True
-
((Triggering unit) belongs to an ally of Player 9 (Gray)) Equal to True
-
((Owner of (Dying unit)) slot status) Equal to Is playing
-
-
Actions
-
Custom script: local timerdialog WINDOW
-
Custom script: local integer HEROWAIT
-
Custom script: local timer OURTIMER
-
Custom script: local unit OURHERO
-
Custom script: set OURHERO = GetDyingUnit()
-
Custom script: set HEROWAIT = 45
-
Custom script: set OURTIMER = CreateTimer()
-
Custom script: call StartTimerBJ( OURTIMER, false, ( I2R(HEROWAIT) ))
-
Custom script: call CreateTimerDialogBJ( OURTIMER, GetPlayerName(GetOwningPlayer(OURHERO)) )
-
Custom script: set WINDOW = GetLastCreatedTimerDialogBJ()
-
Custom script: call TimerDialogDisplayForPlayerBJ( true, WINDOW, GetOwningPlayer(OURHERO) )
-
Custom script: call PolledWait( HEROWAIT )
-
Custom script: call ReviveHeroLoc(OURHERO, GetRectCenter(gg_rct_basecenter), true )
-
Custom script: call PanCameraToTimedLocForPlayer( GetOwningPlayer(OURHERO), GetUnitLoc(OURHERO), 0.60 )
-
Custom script: call DestroyTimerDialog(WINDOW)
-
-