• 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.

Mutliboards

Status
Not open for further replies.
Level 4
Joined
Jul 19, 2010
Messages
99
Okay so i try to make a multiboard so that I can display the amount of villages/towns that a player owns. But it never shows up in game.
  • Events
    • Time - Elapsed game time is 0.00 seconds
  • Conditions
  • Actions
    • Multiboard - Create a multiboard with 4 columns and 2 rows, titled Size Of Empire
    • Set Multiboard = (Last created multiboard)
    • Multiboard - Set the text for Multiboard item in column 1, row 1 to Player
    • Multiboard - Set the text for Multiboard item in column 1, row 2 to Number Of Towns
    • Multiboard - Set the text for Multiboard item in column 2, row 1 to Red
    • Multiboard - Set the text for Multiboard item in column 2, row 2 to (String((Number of living Footman units owned by Player 1 (Red))))
    • Multiboard - Show Multiboard
how do i get this to work :\
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
There should be 'multiboard - show multiboard to player'
No such native exists. It has to be emulated using the GetLocalPlayer() native to run the show asyncrniously.

I am getting tired of explaining that native... Anyway.
GetLocalPlayer() returns the player that belongs to the client running a game session. The returned result thus is asyncrnious and can only ever be active humans (who have a client). By using comparisions of eithor being in a force or against player constants you can get a boolean value that when combined with flow control structures allows you to run natives locally for only 1 client. The important idea is that it is the client it runs locally for and not the player so you infact are doing something only for 1 person. Great for showing a unique multiboard to a certain client. Never use to alter game mechanics for only 1 client like creating a unit (will cause an instant split).

how do i get this to work :\
A-Mexican-Taco, try running it later than 0.00 seconds after the map starts. Try with 1 second to see if it still does not show. If it does show lower the time till it stops shgowing. If it does not show then something else is wrong with the code. Multiboards, leaderboards, quests and dialogs are types of object you try to avoid creating and manipulating close to the map start. This is probably due to the graphic systems they require not yet existing in the game process (as your at the loading screen).
 
Level 4
Joined
Jul 19, 2010
Messages
99
No such native exists. It has to be emulated using the GetLocalPlayer() native to run the show asyncrniously.

I am getting tired of explaining that native... Anyway.
GetLocalPlayer() returns the player that belongs to the client running a game session. The returned result thus is asyncrnious and can only ever be active humans (who have a client). By using comparisions of eithor being in a force or against player constants you can get a boolean value that when combined with flow control structures allows you to run natives locally for only 1 client. The important idea is that it is the client it runs locally for and not the player so you infact are doing something only for 1 person. Great for showing a unique multiboard to a certain client. Never use to alter game mechanics for only 1 client like creating a unit (will cause an instant split).


A-Mexican-Taco, try running it later than 0.00 seconds after the map starts. Try with 1 second to see if it still does not show. If it does show lower the time till it stops shgowing. If it does not show then something else is wrong with the code. Multiboards, leaderboards, quests and dialogs are types of object you try to avoid creating and manipulating close to the map start. This is probably due to the graphic systems they require not yet existing in the game process (as your at the loading screen).

Thanks! Yeah it was just the timing that was off.
 
Status
Not open for further replies.
Top