JASS:
scope BaseIncome initializer Init
private function fTrue takes nothing returns boolean
return true
endfunction
function GiveGold takes nothing returns nothing
local player p = GetEnumPlayer()
call SetPlayerState(p, PLAYER_STATE_RESOURCE_GOLD, GetPlayerState(p, PLAYER_STATE_RESOURCE_GOLD) + 2)
endfunction
//From here
private function actions takes nothing returns nothing
local force f = CreateForce()
call ForceEnumPlayers(f,Condition(function fTrue))
call ForForce(f, function GiveGold)
call DestroyForce(f)
set f = null
endfunction
//To here
private function Init takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterTimerEvent(t, 1.00, true)
call TriggerAddAction(t, function actions)
endfunction
endscope
vJASS...
This will not destroy all players right? :O