• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Multiboard Question

Status
Not open for further replies.
Level 6
Joined
Apr 29, 2007
Messages
140
For my map I want all players to have their own multiboard, but I can't find a specific action that is "show/hide multiboard for specific player". It seems that You can only have one multiboard open at a time. I know that there is a way, but I'm not sure where it is.

I know you can create Leaderboards for a specific player, but I can't seem to find a way to do this for multiboards. Here's what I was wanting to do with the multiboard for 8 specific units:

Status Board Template
------------------------------------------------
Health | Survivivor's Current Health/MaxHealth |
-----------------------------------------------|
Energy | Survivor's Current Mana/Max Mana |
-----------------------------------------------|
Hunger | Survivors Hunger 0%-500% | (500% = Death)
-----------------------------------------------|
Fatigue | Survivors Fatigue 0-100% |
-----------------------------------------------|
Currency| Survivor's Currency/Trade Items |
-----------------------------------------------|
Skill Pts | Survivor's available skillpoints |
------------------------------------------------


Like I said Each player would have their own status board. Would I have to use the Leaderboard instead?
 
Level 21
Joined
Mar 19, 2009
Messages
444
It is done like this.......

JASS:
if GetLocalPlayer() == YOUR_PLAYER then
//CREATE YOUR MULTIBOARD HERE
endif


Definitely not. You will create a desync.

The good way is:

JASS:
if GetLocalPlayer() == YOUR_PLAYER then
//DISPLAY YOUR MULTIBOARD HERE
endif

In other words: you have X players. You need to create 10 multiboards.

Then, you display/hide the boards for the players.

On multiboards, only the display can be changed depending on the player. Not the creation/modification.
 
Level 6
Joined
Apr 29, 2007
Messages
140
Ok, I haven't ever used jass, but I can kind of understand it's concept, not saying I know how to use it though. So lets say I make a multiboard and make it a variable, each variable array represents a player (1-8)

Would the code look like this?

JASS:
if GetLocalPlayer(1) == YOUR_PLAYER then
//DISPLAY Multiboard(1)
endif

or maybe:

JASS:
if GetLocalPlayer() == player 1 then
//DISPLAY Multiboard(1)
endif

I haven't ever attempted to learn jass so I wouldn't be surprised if this is fail or not.
 
Level 9
Joined
Oct 11, 2009
Messages
477
In GUI, it would be like this....


  • Trigger
    • Events
    • Conditions
    • Actions
      • Custom script: if GetLocalPlayer() == YOUR_PLAYER then
      • Display your multiboard here
      • Custom script: endif
 
You can replace the "YOUR_PLAYER" by :
JASS:
if GetLocalPlayer() == ConvertedPlayer(1) then
if GetLocalPlayer() == Player(0) then // Same as above but you subtract 1.
if GetLocalPlayer() == ConvertedPlayer(bj_forLoopAIndex) then // For loops.
if GetLocalPlayer() == GetTriggerPlayer() then // For event response.

You can actually put a lot of things. You just need to know the functions' name which are listed in Common.j and Blizzard.j files or here for instance.
 
Status
Not open for further replies.
Top