AdamGriffith
You can change this now in User CP.
- Reaction score
- 69
Hello again,
For some reason the BJDebugMsg is displayed but udg_Income[0] is not being set correctly. Any ideas?
JASS:
scope Initialization initializer Init
private function TimerCallback takes nothing returns nothing
local integer i = 0
loop
exitwhen i == 11
call SetPlayerState(Player(i), PLAYER_STATE_GOLD_GATHERED, udg_Income<i>)
call SetPlayerState(Player(i), PLAYER_STATE_RESOURCE_GOLD, udg_Income<i>)
set i = i + 1
endloop
endfunction
private function GroupCallback takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
//===========================================================================
private function Init takes nothing returns nothing
local group g = CreateGroup()
local integer i = 0
local timer t = CreateTimer()
call FogEnable(false)
call FogMaskEnable(false)
call SetFloatGameState(GAME_STATE_TIME_OF_DAY, 12.0)
loop
exitwhen i == 11
if GetPlayerSlotState(Player(i)) == PLAYER_SLOT_STATE_PLAYING then
call CreateUnit(Player(i), 039;h002039;, GetStartLocationX(i), GetStartLocationY(i), 0.0)
set udg_Alive<i> = true
else
call GroupEnumUnitsOfPlayer(g, Player(i), null)
call ForGroup(g, function GroupCallback)
set udg_Alive<i> = false
endif
set udg_Income<i> = 25
set udg_Lives<i> = 25
call SetPlayerState(Player(i), PLAYER_STATE_GIVES_BOUNTY, IntegerTertiaryOp(true, 1, 0))
call SetPlayerState(Player(i), PLAYER_STATE_GOLD_GATHERED, GetPlayerState(Player(i), PLAYER_STATE_GOLD_GATHERED) + 30)
call SetPlayerState(Player(i), PLAYER_STATE_RESOURCE_GOLD, GetPlayerState(Player(i), PLAYER_STATE_RESOURCE_GOLD) + 30)
set i = i + 1
endloop
call BJDebugMsg("Setting udg_Income[0] = 25")
set udg_Income[0] = 25
call TimerStart(t, 20.0, true, function TimerCallback)
call DestroyGroup(g)
set g = null
set t = null
endfunction
endscope</i></i></i></i></i></i>
For some reason the BJDebugMsg is displayed but udg_Income[0] is not being set correctly. Any ideas?