J
justin9020
Guest
Can anyone show me how to get this code to run on the event of a neutral-hostile death.It'd be much appreciated. Ive been reading through many tutorials but still getting used to this JASS stuff.
Code:
function Trig_Creep_Revive_Actions takes nothing returns nothing
local integer i = GetUnitUserData(GetTriggerUnit())
call TriggerSleepAction( 30.00 )
call CreateUnitAtLoc( Player(PLAYER_NEUTRAL_AGGRESSIVE), udg_Creep_Types[i], udg_Creep_Positions[i], bj_UNIT_FACING )
call SetUnitUserData( GetLastCreatedUnit(), i )
endfunction
//===========================================================================
function InitTrig_Creep_Revive takes nothing returns nothing
set gg_trg_Creep_Revive = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Creep_Revive, Player(PLAYER_NEUTRAL_AGGRESSIVE), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Creep_Revive, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_Creep_Revive, function Trig_Creep_Revive_Actions )
endfunction