Hullo, I was gonna use this multiboard trick where you only display a multiboard to a certain player, and it didnt work, can anyone correct this or explain why it doesnt work... or something?
Dont mind the udg_variables, they havent actually been corrected. its the whole if(GetLocalPlayer()==p) thing im confused about.
Dont mind the udg_variables, they havent actually been corrected. its the whole if(GetLocalPlayer()==p) thing im confused about.
JASS:
function Trig_Create_Multiboard_Actions takes nothing returns nothing
local integer i
local player p
set p=Player(0)
set i=0
call TriggerSleepAction( 0.05 )
call SetTimeOfDay( 6.00 )
set udg_real_Seconds = 5.00
set udg_real_PeriodicTime = 0.05
set udg_real_TimeBetweenPower = ( udg_real_Seconds * ( 1 / udg_real_PeriodicTime ) )
// Time between power gain is as follows: 20= 1 second, 40= 2 etc.
// real_TimeBetweenPower = Time/(1/Periodic Time) = n seconds
// or: n seconds * (1/Periodic Time) = Time (= time for TimeBetweenPower)
set udg_real_PowerAdd = 0.00
set udg_real_MaxPower = 5000.00
loop
exitwhen (i>11)
call CreateMultiboardBJ( 2, 2, "Power" )
set udg_multiboard_Power = GetLastCreatedMultiboard()
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, 1, "Current: " )
call MultiboardSetItemIconBJ( GetLastCreatedMultiboard(), 1, 1, "ReplaceableTextures\\CommandButtons\\BTNMoonStone.blp" )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, 1, I2S(R2I(udg_real_Power)) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, 2, "Max: " )
call MultiboardSetItemIconBJ( GetLastCreatedMultiboard(), 1, 2, "ReplaceableTextures\\CommandButtons\\BTNMoonStone.blp" )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, 2, I2S(R2I(udg_real_MaxPower)) )
call MultiboardSetItemStyleBJ( GetLastCreatedMultiboard(), 2, 1, true, false )
call MultiboardSetItemStyleBJ( GetLastCreatedMultiboard(), 2, 2, true, false )
call MultiboardSetItemWidthBJ( GetLastCreatedMultiboard(), 1, 1, 7.00 )
call MultiboardSetItemWidthBJ( GetLastCreatedMultiboard(), 2, 1, 6.00 )
call MultiboardSetItemWidthBJ( GetLastCreatedMultiboard(), 1, 2, 7.00 )
call MultiboardSetItemWidthBJ( GetLastCreatedMultiboard(), 2, 2, 6.00 )
call MultiboardDisplayBJ( false, GetLastCreatedMultiboard() )
if(GetLocalPlayer()== p) then
call MultiboardDisplayBJ( true, GetLastCreatedMultiboard() )
endif
set p=Player(i)
set i=i+1
endloop
endfunction
//===========================================================================
function InitTrig_Create_Multiboard takes nothing returns nothing
set gg_trg_Create_Multiboard = CreateTrigger( )
call TriggerAddAction( gg_trg_Create_Multiboard, function Trig_Create_Multiboard_Actions )
endfunction