JASS:
function filter_Copy takes nothing returns nothing
local integer i = 0
local unit u = GetFilterUnit()
local real x = GetUnitX(u)
local real y = GetUnitY(u)
if GetUnitTypeId(u) == 039;h001039; and GetPlayerState(GetOwningPlayer(u), PLAYER_STATE_RESOURCE_FOOD_USED) < 70 then
loop
exitwhen i >= 5
call CreateUnit(GetOwningPlayer(u), 039;h00C039;, x,y, bj_UNIT_FACING)
set i = i + 1
endloop
endif
set u = null
endfunction
function Actions takes nothing returns nothing
local group g = CreateGroup()
call GroupEnumUnitsInRect(g, bj_mapInitialPlayableArea, null)
call ForGroup(g, function filter_Copy)
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_Spawn_Basic_Copy takes nothing returns nothing
set gg_trg_Spawn_Basic_Copy = CreateTrigger()
call TriggerRegisterTimerEventPeriodic(gg_trg_Spawn_Basic_Copy, 2.0)
call TriggerAddAction(gg_trg_Spawn_Basic_Copy, function Actions)
endfunction
cuz i can't and this is crashing my game after 2 hours XD
this is a footmen frenzy spawn-like trigger
pls help me
(when i disable this trigger it does not crash )