Name | Type | is_array | initial_value |
Allcomp_hero | integer | No | |
battle_camp | rect | Yes | |
circles | unit | Yes | |
comp_to_battle | location | No | |
Comphero | unitcode | Yes | |
Creep_Spawner | unit | Yes | |
creeps | unitcode | Yes | |
dead_dragon_pos | location | No | |
dead_hero | unit | No | |
death | integer | Yes | |
death_match | button | No | |
defeated_player_units | group | No | |
dragon | unit | Yes | |
enemy_units | group | No | |
fifteen | button | No | |
healer | unit | Yes | |
hero1 | button | No | |
hero2 | button | No | |
hero3 | button | No | |
Hero_Kill | integer | Yes | |
Hero_timer | timer | No | |
Hero_timerwindow | timerdialog | No | |
into_battle | rect | Yes | |
killing_hero | unit | No | |
List | integer | No | |
MB_Spots | integer | Yes | |
Mboard | multiboard | No | |
Minutes | integer | No | |
Mode | dialog | No | |
move_comp_H2P | location | No | |
normal | button | No | |
Num_Hero | dialog | No | |
Number_of_Kills | dialog | No | |
Player_Color | string | Yes | |
Player_Count | integer | No | |
random_count | integer | No | |
random_data | integer | Yes | |
Random_hero | integer | No | |
reg_pick_hero | location | No | |
region_back_off | location | No | |
region_engage | location | No | |
Seconds | integer | No | |
six | button | No | |
Start | rect | Yes | |
ten | button | No | |
three | button | No | |
twenty | button | No | |
unit_entering_creep_rect | unit | Yes | |
winning_player_unit | group | No |
//TESH.scrollpos=20
//TESH.alwaysfold=0
function Trig_Revive_Hero_Conditions takes nothing returns boolean
return IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO)
endfunction
function Trig_Revive_Hero_Actions 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, GetPlayerStartLocationLoc(GetOwningPlayer(OURHERO)), true )
call PanCameraToTimedLocForPlayer( GetOwningPlayer(OURHERO), GetUnitLoc(OURHERO), 0.60 )
call DestroyTimerDialog(WINDOW)
endfunction
//===========================================================================
function InitTrig_Revive_Hero takes nothing returns nothing
set gg_trg_Revive_Hero = CreateTrigger( )
call DisableTrigger( gg_trg_Revive_Hero )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Revive_Hero , EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Revive_Hero , Condition( function Trig_Revive_Hero_Conditions ) )
call TriggerAddAction( gg_trg_Revive_Hero , function Trig_Revive_Hero_Actions )
endfunction