• 🏆 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!

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,232
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