Name | Type | is_array | initial_value |
Button | button | No | |
Button_Copy | button | No | |
Dialog | dialog | No | |
Flags | integer | Yes | |
Kills | integer | Yes |
function Trig_death_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( IsUnitAlly(GetDyingUnit(), Player(0)) == true ) ) then
return false
endif
return true
endfunction
function Trig_death_Actions takes nothing returns nothing
call ReviveHeroLoc( GetDyingUnit(), GetRectCenter(gg_rct_Region_001), false )
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetDyingUnit()), GetRectCenter(gg_rct_Region_001), 2.00 )
endfunction
//===========================================================================
function InitTrig_death takes nothing returns nothing
set gg_trg_death = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_death, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_death, Condition( function Trig_death_Conditions ) )
call TriggerAddAction( gg_trg_death, function Trig_death_Actions )
endfunction
function Trig_death_Copy_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( IsUnitAlly(GetDyingUnit(), Player(4)) == true ) ) then
return false
endif
return true
endfunction
function Trig_death_Copy_Actions takes nothing returns nothing
call ReviveHeroLoc( GetDyingUnit(), GetRectCenter(gg_rct_Region_003), true )
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetDyingUnit()), GetRectCenter(gg_rct_Region_003), 2.00 )
endfunction
//===========================================================================
function InitTrig_death_Copy takes nothing returns nothing
set gg_trg_death_Copy = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_death_Copy, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_death_Copy, Condition( function Trig_death_Copy_Conditions ) )
call TriggerAddAction( gg_trg_death_Copy, function Trig_death_Copy_Actions )
endfunction