2 Multiboards??

darkbeer

Beer is Good!
Reaction score
84
hey,

is it possible to have 2 multiboards, each shown to a specific player(s), i know about the local player thing, how to show it to a specific player, but i cannot create 2 multiboards.

the first one is destroyed or sth., when the second 1 is created.

Anyone got any help for me :)

Big thy
 

Rheias

New Helper (I got over 2000 posts)
Reaction score
232
JASS:
function Trig_Untitled_Trigger_002_Actions takes nothing returns nothing
    local integer c = 0

    loop
        exitwhen c > 11
        if GetLocalPlayer() == Player(c) then
            set udg_Multi[c] = CreateMultiboard()
            call MultiboardDisplay(udg_Multi[c],true)
        endif
        set c = c + 1
    endloop
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_002 takes nothing returns nothing
    set gg_trg_Untitled_Trigger_002 = CreateTrigger(  )
    call TriggerRegisterTimerEventSingle( gg_trg_Untitled_Trigger_002, 1.00 )
    call TriggerAddAction( gg_trg_Untitled_Trigger_002, function Trig_Untitled_Trigger_002_Actions )
endfunction


Should create a multiboard for each player and show it only to him, stores the multiboard in udg_Multi[Player's Id(Jass)]

Go wild.
 

SFilip

Gone but not forgotten
Reaction score
634

darkbeer

Beer is Good!
Reaction score
84
Thanks

okay allright guess ill have to make a lot of multibards xD

thaks anyway :)
 
S

SoCal_420

Guest
How would you change the text / number of row in the mutliboard. cause i tried picking all players and do actions. then set the rows to the multiboard [(player Number of picked player )]
 

Magentix

if (OP.statement == false) postCount++;
Reaction score
107
JASS:
        if GetLocalPlayer() == Player(c) then
            call MultiboardDisplay(udg_Multi[c],true)
        endif


How come this would only show it for one player instead of all players?
In the end, you're still calling the same "MultiboardDisplay" in a simple "if,then,else", no?
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
call MultiboardDisplay(udg_Multi[c], GetLocalPlayer() == Player(c))

No "if", no weird test.
As an added bonus, it specifically turns it off for all "wrong" players.


But, yes, it works.
The idea behind "get local player" is to run a test for each player in the game, and to run the actions inside for only that one player.
So, only one player will run the "show" action...
 

PurgeandFire

zxcvmkgdfg
Reaction score
508
JASS:
        if GetLocalPlayer() == Player(c) then
            call MultiboardDisplay(udg_Multi[c],true)
        endif


How come this would only show it for one player instead of all players?
In the end, you're still calling the same "MultiboardDisplay" in a simple "if,then,else", no?

Yes, what acehart said.

GetLocalPlayer should only be used to do something for one player or force. GetLocalPlayer is used for many purposes, and Multiboards is a common one. GetLocalPlayer registers that single player and then plays the action for only that player.

Note that GetLocalPlayer is a desyncy function, so you should know what you are doing before you use it. ;)
 
S

SoCal_420

Guest
How would you change the text / number of row in the mutliboard. cause i tried picking all players and do actions. then set the rows to the multiboard [(player Number of picked player )]

can ne 1 anser my Qusetion?

Edit : Nevermind i figured it out

JASS:
function Trig_Untitled_Trigger_002_Actions takes nothing returns nothing
    local integer c = 0

    loop
        exitwhen c > 11
        if GetLocalPlayer() == Player(c) then
            set udg_Multi[c] = CreateMultiboard()
            call MultiboardDisplay(udg_Multi[c],true)
            call MultiboardSetTitleText( udg_Multi[c], "TRIGSTR_274" )
            call MultiboardSetColumnCount( udg_Multi[c], 2 )
            call MultiboardSetRowCount( udg_Multi[c], 1 )

        endif
        set c = c + 1
    endloop
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_002 takes nothing returns nothing
    set gg_trg_Untitled_Trigger_002 = CreateTrigger(  )
    call TriggerRegisterTimerEventSingle( gg_trg_Untitled_Trigger_002, 1.00 )
    call TriggerAddAction( gg_trg_Untitled_Trigger_002, function Trig_Untitled_Trigger_002_Actions )
endfunction
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top