- Joined
- May 30, 2009
- Messages
- 829
A hero resurrection script written by SD_Ryoko and "uploaded" by me. Written in regular JASS not vJASS.
How to Implement: Copy and Paste this into your map. (Not into a trigger, the start script)
Attached map by SD_Ryoko contains the resurrection trigger and more.
How to Implement: Copy and Paste this into your map. (Not into a trigger, the start script)
JASS:
function rez takes nothing returns nothing
local timerdialog WINDOW
local integer HEROWAIT
local timer OURTIMER
local unit OURHERO
set OURHERO = GetDyingUnit()
set HEROWAIT = ( GetHeroLevel(OURHERO)*5)
set OURTIMER = CreateTimer()
call StartTimerBJ( OURTIMER, false, ( I2R(HEROWAIT) ))
call CreateTimerDialogBJ(OURTIMER,GetPlayerName(GetOwningPlayer(OURHERO)))
set WINDOW = GetLastCreatedTimerDialogBJ()
call TimerDialogDisplayForPlayerBJ(true,WINDOW,GetOwningPlayer(OURHERO))
call PolledWait(HEROWAIT)
call ReviveHeroLoc(OURHERO, GetRectCenter(GetPlayableMapRect()),true)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(OURHERO),GetUnitLoc(OURHERO),0.60)
call DestroyTimerDialog(WINDOW)
endfunction
- Events
- Conditions
-
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 = ( GetHeroLevel(OURHERO)*5)
- 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(GetPlayableMapRect()),true)
- Custom Script: call PanCameraToTimedLocForPlayer(GetOwningPlayer(OURHERO),GetUnitLoc(OURHERO),0.60)
- Custom Script: call DestroyTimerDialog(WINDOW)
Last edited: