Multiboard
To show a multiboard for 1 person only (everyone his own) requires the use of LocalPlayer (jass). This function should only be used if you are 100% sure that it's used correctly because else the game will result into a game split (half the people leave).
Easiest way how to set one up is doing this:
Make a new trigger. In this example i will just use Multiboard as name.
Put as event map initilialisation or when you want the multiboard to show.
Then go to edit, convert to custom text. It will look like this:
---------------------------------------------------------------------
function Trig_Multiboard_Actions takes nothing returns nothing
endfunction
//========================================================
function InitTrig_Multiboard takes nothing returns nothing
set gg_trg_Multiboard = CreateTrigger( )
call TriggerAddAction( gg_trg_Multiboard, function Trig_Multiboard_Actions )
endfunction
---------------------------------------------------------------------
Now we got a trigger with a name and it runs when map starts. Now we just simple add the group which should get a multiboard (Everyone in this example) and put it in the function like this:
---------------------------------------------------------------------
function Trig_Multiboard_Actions takes nothing returns nothing
call ForForce( GetPlayersAll(), function ShowMultiboard )
endfunction
---------------------------------------------------------------------
Next step is we add a variable. In the example i call it Multiboards.
Make it as type Multiboard and an array.
Now for the last function
function MultiboardShow takes nothing returns nothing
if GetEnumPlayer() == GetLocalPlayer() then
call MultiboardDisplayBJ( true, udg_Multiboards[GetConvertedPlayerId(GetEnumPlayer() )] )
endif
endfunction
make sure that the call is put on 1 line (it's too long here it seems). Put this above the other text and you will get as total trigger this:
function MultiboardShow takes nothing returns nothing
if GetEnumPlayer() == GetLocalPlayer() then
call MultiboardDisplayBJ( true, udg_Multiboards[GetConvertedPlayerId(GetEnumPlayer() )] )
endif
endfunction
function Trig_MultiboardShow_Actions takes nothing returns nothing
call ForForce( udg_AttackerGroup, function MultiboardShow )
endfunction
//========================================================
function InitTrig_Multiboard takes nothing returns nothing
set gg_trg_Multiboard = CreateTrigger( )
call TriggerAddAction( gg_trg_Multiboard, function Trig_Multiboard_Actions )
endfunction
Couple more things. Make sure to make a multiboard for every player before this trigger is run and that they are set to not visible. (If you dont want it to run on map inate or want to be sure to make you rmultiboard faster uncheck run at map initalisation on top of the screen. and pick another trigger and add the Gui statement:
Trigger - Run Multiboard <gen> (ignoring conditions)