Show Multiboard for Player?

inevit4ble

Well-Known Member
Reaction score
38
Hi Every1,

I have made multiboards display the players hero stats etc, and when called upon how can I show only the trigger player's board to only that player.

Example:
Player 1 uses "show multiboard ability" , player1 board gets shown to player1
Player 2 uses "show multiboard ability" , player2 board gets shown to player2, but doesn't remove player1 board


Each board is save to a value in an array.

I'm thinking GetLocalPlayer() might work but not sure how to use it right for this because the native doesn't have a player input field:
call MultiboardDisplay(whichBoard, boolean show)
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
Do you know how to use jass? You will need it, but you can do GUI scripts with a couple of jass lines for this as well.

First create one multiboard for each player, then hide all of them.

Now you have to do something like this:
Code:
set udg_Temp_Player = Player 1 (Red)
if Temp_Player == GetLocalPlayer()
 multiboard - show multiboard XYZ
endif
this example show the multiboard XYZ to player 1. Do so for each player, an iteration through an array would be best.

the "if" and "endif" lines must be Jass because local player comparison is not possible with GUI, however, you can do the lines in between and around in GUI if you feel more comfortable with it.
 

inevit4ble

Well-Known Member
Reaction score
38
This is for jass.

Ok, so GetLocalPlayer only does actions for that player no matter what. ok cool.

But will I have an issue with my multiboard variable being global?


EDIT: Ok test was ok for me, Player 1. It didn't crash or anything. So it should work.

Thx :)

But then instead of me creating and destroying the boards I should rather hide and show them as you say.
A question about this though, I can change the ItemValues while its hidden correct?
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
The problem is, when using local player all functions inside the "if" statement will really only be executed on the game of the local player.
if be both would play multiplayer, and in a map code would be executed for the local player, lets say me, that code would only run on my computer.
The danger of this is games desynching because on my computer there might be different game data as on yours.

You should be very careful which actions you put inside that if, i advice you only to use visual stuff, do never create something for a local player only, do nothing with units.

and of course you can change whatever values you want even if the multiboard is hidden.
 

inevit4ble

Well-Known Member
Reaction score
38
Ok well I should be safe then, as the only line in the If statement is the Multiboard display.

Thx :)
 

luorax

Invasion in Duskwood
Reaction score
67
If I recall correctly, you've learnt how to use vJASS. I'd suggest you to use this snippet. It's got an amazing interface.
 

inevit4ble

Well-Known Member
Reaction score
38
You are correct :D

That snippet looks get, have popped it into my map and will utilize it from now on.
Thanks for pointing it out!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top