Hi i have problem with multiboards when is more than one player connected multiboards are hidden for both here is script
^^^^^ Creates multiboards for each online player and show only for him...
JASS:
function HeroInfoMultiboard_Action takes nothing returns nothing
local multiboard mb = null
local integer i = 0
local mapcontrol mct
local playerslotstate pss
loop
set mct = GetPlayerController(Player(i))
set pss = GetPlayerSlotState(Player(i))
if(mct == MAP_CONTROL_USER and pss == PLAYER_SLOT_STATE_PLAYING)then
set mb = CreateMultiboard()
call SaveMultiboardHandle(HeroDatabaseHashtable(), i, 28, mb)
// MB Settings
call MultiboardSetRowCount(mb, 10)
call MultiboardSetColumnCount(mb, 2)
call MultiboardSetTitleText(mb, "Hero Stats - " + GetPlayerName(Player(i)))
call MultiboardSetItemsStyle(mb, true, false)
//....................
//.......................
call MultiboardDisplay(mb, false) // This will hide multiboard mb for all players...
if(GetLocalPlayer() == Player(i))then
call MultiboardDisplay(mb, true) // And This will show it only to player i...
endif
//
set i = i + 1
endif
exitwhen i == 9
endloop
set mb = null
set mct = null
set pss = null
endfunction
function InitTrig_MultiboardHeroStats takes nothing returns nothing
local trigger tt = CreateTrigger()
call TriggerRegisterTimerEventSingle(tt, 0.01)
call TriggerAddAction(tt, function HeroInfoMultiboard_Action)
set tt = null
endfunction
Last edited: