hi,
i'm new here, how do i make trigger for every 8 seconds the bots will have 1200 gold. below is a script but tried it and wont workd. any help would be much appreciated.
thanks,
chickie
//===========================================================================
// Trigger: -free gold
//===========================================================================
function Trig_Free_Gold_FuncA takes nothing returns boolean
return ( InsaneMode_On == true )
endfunction
function Trig_Free_Gold_FuncB takes nothing returns nothing
call AdjustPlayerStateBJ( udg_TempInteger, GetEnumPlayer(), PLAYER_STATE_RESOURCE_GOLD )
endfunction
function Trig_Free_Gold_Actions takes nothing returns nothing
set udg_TempInteger = 8
if ( Trig_Free_Gold_FuncA() ) then
set udg_TempInteger = 1200
else
call DoNothing( )
endif
call ForForce( bj_FORCE_ALL_PLAYERS, function Trig_Free_Gold_FuncB)
endfunction
//===========================================================================
function InitTrig_Free_Gold_mtf takes nothing returns nothing
set gg_trg_Free_Gold_mtf = CreateTrigger( )
call DisableTrigger( gg_trg_Free_Gold_mtf)
call TriggerRegisterTimerEventPeriodic( gg_trg_Free_Gold_mtf, 8.00 )
call TriggerAddAction( gg_trg_Free_Gold_mtf, function Trig_Free_Gold_Actions )
endfunction
i'm new here, how do i make trigger for every 8 seconds the bots will have 1200 gold. below is a script but tried it and wont workd. any help would be much appreciated.
thanks,
chickie
//===========================================================================
// Trigger: -free gold
//===========================================================================
function Trig_Free_Gold_FuncA takes nothing returns boolean
return ( InsaneMode_On == true )
endfunction
function Trig_Free_Gold_FuncB takes nothing returns nothing
call AdjustPlayerStateBJ( udg_TempInteger, GetEnumPlayer(), PLAYER_STATE_RESOURCE_GOLD )
endfunction
function Trig_Free_Gold_Actions takes nothing returns nothing
set udg_TempInteger = 8
if ( Trig_Free_Gold_FuncA() ) then
set udg_TempInteger = 1200
else
call DoNothing( )
endif
call ForForce( bj_FORCE_ALL_PLAYERS, function Trig_Free_Gold_FuncB)
endfunction
//===========================================================================
function InitTrig_Free_Gold_mtf takes nothing returns nothing
set gg_trg_Free_Gold_mtf = CreateTrigger( )
call DisableTrigger( gg_trg_Free_Gold_mtf)
call TriggerRegisterTimerEventPeriodic( gg_trg_Free_Gold_mtf, 8.00 )
call TriggerAddAction( gg_trg_Free_Gold_mtf, function Trig_Free_Gold_Actions )
endfunction