Hey,
So the following trigger is supposed to limit the training of a unit type for all players, yet in game I can still build an unlimited number of the unit, any idea why its not working?
So the following trigger is supposed to limit the training of a unit type for all players, yet in game I can still build an unlimited number of the unit, any idea why its not working?
HTML:
function Trig_test_Func002002 takes nothing returns nothing
call SetPlayerTechMaxAllowedSwap( 'h01C', 2, GetEnumPlayer() )
endfunction
function Trig_test_Actions takes nothing returns nothing
set udg_tempgroup = GetPlayersAll()
call ForForce( udg_tempgroup, function Trig_test_Func002002 )
call DestroyForce( udg_tempgroup )
endfunction
//===========================================================================
function InitTrig_test takes nothing returns nothing
set gg_trg_test = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_test, 5 )
call TriggerAddAction( gg_trg_test, function Trig_test_Actions )
endfunction