Hey guys, can anyone convert this to GUI?
Any variables can be marked as so:
Variable Name - Type - Array [Yes/No] - Initial Value
JASS:
function Trig_Income_Func002Func004C takes nothing returns boolean
if(not(udg_reals16[GetForLoopIndexA()]==0.00))then
return false
endif
return true
endfunction
function Trig_Income_Func002Func011C takes nothing returns boolean
if(not(udg_integers49[GetForLoopIndexA()]<=-5))then
return false
endif
return true
endfunction
function Trig_Income_Actions takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set udg_integers46[GetForLoopIndexA()]=GetPlayerState(udg_players01[GetForLoopIndexA()],PLAYER_STATE_RESOURCE_FOOD_USED)
set udg_integers47[GetForLoopIndexA()]=GetPlayerState(udg_players01[GetForLoopIndexA()],PLAYER_STATE_RESOURCE_LUMBER)
set udg_reals16[GetForLoopIndexA()]=(1.00-(I2R(udg_integers46[GetForLoopIndexA()])*0.01))
if(Trig_Income_Func002Func004C())then
set udg_reals17[GetForLoopIndexA()]=((I2R(udg_integers47[GetForLoopIndexA()])/10.00)-100.00)
else
set udg_reals17[GetForLoopIndexA()]=((I2R(udg_integers47[GetForLoopIndexA()])/10.00)*udg_reals16[GetForLoopIndexA()])
endif
set udg_integers48[GetForLoopIndexA()]=R2I(udg_reals17[GetForLoopIndexA()])
call DisplayTimedTextToPlayer(udg_players01[GetForLoopIndexA()],0,0,10.00,"TRIGSTR_703")
call DisplayTimedTextToPlayer(udg_players01[GetForLoopIndexA()],0,0,10.00,("Peasants:"+I2S(udg_integers47[GetForLoopIndexA()])))
call DisplayTimedTextToPlayer(udg_players01[GetForLoopIndexA()],0,0,10.00,("Military:"+I2S(udg_integers46[GetForLoopIndexA()])))
call DisplayTimedTextToPlayer(udg_players01[GetForLoopIndexA()],0,0,10.00,("Income:"+I2S(udg_integers48[GetForLoopIndexA()])))
call AdjustPlayerStateBJ(udg_integers48[GetForLoopIndexA()],udg_players01[GetForLoopIndexA()],PLAYER_STATE_RESOURCE_GOLD)
if(Trig_Income_Func002Func011C())then
set udg_integers49[GetForLoopIndexA()]=(udg_integers49[GetForLoopIndexA()]+5)
else
call DoNothing()
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
Any variables can be marked as so:
Variable Name - Type - Array [Yes/No] - Initial Value