• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Multiboard Question [Solved]

Status
Not open for further replies.
Level 11
Joined
Aug 11, 2009
Messages
605
So I am trying to make a multiboard for each player. I have created 8 different multiboards and then i hide them. After that I use this loop but it doesnt show any multiboard at all. If you want I can post the whole trigger but I dont think there is anything wrong with the creation of the multiboards as they showed up before i tried to add this. I have never used GetLocalPlayer before so I am not familiar with how it works.

  • For each (Integer LoopInt) from 1 to 8, do (Actions)
    • Loop - Actions
      • Custom script: set udg_LocalPlayer = GetLocalPlayer()
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • LocalPlayer Equal to (Player(LoopInt))
        • Then - Actions
          • Multiboard - Show MB_Player[LoopInt]
        • Else - Actions
EDIT: I can add that this is supposed to happen at map start, for now its on an event time elapsed equal to 0. Maybe GetLocalPlayer requires a player event? How would I then set this up so it happens automatically at map start?
 
Last edited:

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,871
That should work fine assuming that the Event is happening after you've created the Multiboards. But I prefer this method:
  • For each (Integer LoopInt) from 1 to 8, do (Actions)
    • Loop - Actions
      • Custom script: if GetLocalPlayer() == Player(udg_LoopInt - 1) then
      • Multiboard - Show MB_Player[LoopInt]
      • Custom script: endif
Mainly because I know for certain that it works, lol.

Anyway, make sure that you've actually set MB_Player[X] to the different Multiboards.

I can't tell you much more without seeing all of your related triggers.
 
Last edited:
Level 11
Joined
Aug 11, 2009
Messages
605
Yeah, the multiboard setup is correct, i use the same 1-8 loop to set it up.

When i changed the show multiboard to a player types chat message event it worked properly though.

Will try your custom script and see how it works :) though when i tried a different custom if/then/else script i got an error saying unexpected "else". But will see how this one works when i get home :)

Edit: I see you added a LoopInt -1 in the array which might solve the problem :) i guess player numbers are 0-7 instead of 1-8?

Thanks for the reply!
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,871
Yeah, the multiboard setup is correct, i use the same 1-8 loop to set it up.

When i changed the show multiboard to a player types chat message event it worked properly though.

Will try your custom script and see how it works :) though when i tried a different custom if/then/else script i got an error saying unexpected "else". But will see how this one works when i get home :)

Edit: I see you added a LoopInt -1 in the array which might solve the problem :) i guess player numbers are 0-7 instead of 1-8?

Thanks for the reply!
They're only indexed starting at 0 if you call the Player() function. The trigger editor's version of Player(#) starts at 1 like you'd expect.

I can't see your full trigger so I can't really help much more.
 
Level 11
Joined
Aug 11, 2009
Messages
605
Oh ok, I can post full triggers when i get home after work :)

EDIT: I copied your suggestion and it worked :D thanks alot for the help!
 
Last edited:
Status
Not open for further replies.
Top