Initialization
This trigger will be fired every 50 seconds.
Proximity Spawn
JASS:
function Trig_Initialization_Actions takes nothing returns nothing
set udg_ZombiePoints[1] = GetRectCenter(gg_rct_UndeadSpawn1)
set udg_ZombiePoints[2] = GetRectCenter(gg_rct_UndeadSpawn2)
set udg_ZombiePoints[3] = GetRectCenter(gg_rct_UndeadSpawn3)
set udg_ZombiePoints[4] = GetRectCenter(gg_rct_UndeadSpawn4)
set udg_ZombiePoints[5] = GetRectCenter(gg_rct_UndeadSpawn5)
set udg_ZombiePoints[6] = GetRectCenter(gg_rct_UndeadSpawn6)
set udg_ZombiePoints[7] = GetRectCenter(gg_rct_UndeadSpawn7)
endfunction
//===========================================================================
function InitTrig_Initialization takes nothing returns nothing
set gg_trg_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Initialization, function Trig_Initialization_Actions )
endfunction
This trigger will be fired every 50 seconds.
Proximity Spawn
JASS:
function ProximitySpawn takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 7
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 039;nzom039;, Player(bj_PLAYER_NEUTRAL_EXTRA), udg_ZombiePoints[GetForLoopIndexA()], bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 039;n008039;, Player(bj_PLAYER_NEUTRAL_EXTRA), udg_ZombiePoints[GetForLoopIndexA()], bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 039;ugho039;, Player(bj_PLAYER_NEUTRAL_VICTIM), udg_ZombiePoints[GetForLoopIndexA()], bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 039;u000039;, Player(bj_PLAYER_NEUTRAL_VICTIM), udg_ZombiePoints[GetForLoopIndexA()], bj_UNIT_FACING )
call RemoveLocation(udg_ZombiePoints[(Integer A)])
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Proximity_Spawn takes nothing returns nothing
set gg_trg_Proximity_Spawn = CreateTrigger( )
call TriggerRegisterTimerEvent(gg_trg_Proximity_Spawn,50.0,true)
call TriggerAddAction( gg_trg_Proximity_Spawn,function ProximitySpawn )
endfunction