cleeezzz
The Undead Ranger.
- Reaction score
- 268
JASS:
scope Clock initializer Init
globals
private integer Seconds = 0
private integer Minutes = 0
endglobals
private function Set takes nothing returns nothing
call SetPlayerState( GetEnumPlayer(), PLAYER_STATE_RESOURCE_LUMBER, Minutes )
call SetPlayerState( GetEnumPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED, Seconds )
endfunction
private function Actions takes nothing returns nothing
local force f = CreateForce()
set Seconds = ( Seconds + 1 )
if Seconds == 60 then
set Minutes = ( Minutes + 1 )
set Seconds = 0
endif
set f = bj_FORCE_ALL_PLAYERS
call ForForce( f , function Set )
call DestroyForce(f)
set f = null
endfunction
//===========================================================================
private function Init takes nothing returns nothing
local trigger trig = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( trig, 1.00 )
call TriggerAddAction( trig, function Actions )
endfunction
endscope
i cant set f to bj_FORCE_ALL_PLAYERS? cuz its not working. whats the workaround to GetPlayersAll() (unless i have to create a player group global myself)