• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Multiboard

Status
Not open for further replies.
Level 2
Joined
Dec 6, 2008
Messages
9
how to make a multiboard for one concrete player?

(show the multiboard for this player)
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,195
Via use of GetLocalPlayer() native which takes nothing and returns player.
The player returned is that of who ever's PC runs it. This means that all human players get a unique value for it while computers are never able to be returned via it.

Basically you check if that native returns a player equal to the specific player you want to only be able to see it. If so you then reveal the board, otherwise you hide it.

Works with all graphic effects. Be warned that anything that causes net traffic to run with it will cause a split (out of sync error). What is displayed does not have to have logical results. Eg you can use it to display a dialog locally to all players without any problem, even though in practice this means that some players will appear to never be shown the dialog yet pick options (WC3 allows you to pick dialog options even without ever seeing the dialog).

GetLocalPlayer allows much more, have fun trying it out but like mentioned avoid net traffic as it will cause a split.
 
Level 2
Joined
Dec 6, 2008
Messages
9
Via use of GetLocalPlayer() native which takes nothing and returns player.
The player returned is that of who ever's PC runs it. This means that all human players get a unique value for it while computers are never able to be returned via it.

Basically you check if that native returns a player equal to the specific player you want to only be able to see it. If so you then reveal the board, otherwise you hide it.

Works with all graphic effects. Be warned that anything that causes net traffic to run with it will cause a split (out of sync error). What is displayed does not have to have logical results. Eg you can use it to display a dialog locally to all players without any problem, even though in practice this means that some players will appear to never be shown the dialog yet pick options (WC3 allows you to pick dialog options even without ever seeing the dialog).

GetLocalPlayer allows much more, have fun trying it out but like mentioned avoid net traffic as it will cause a split.

Okay, but im spanish and i dont understand 100%

can you write the full script plis?
thanks
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,195
Code:
    if GetLocalPlayer() == Player(0) then
        //Your action code to display multiboard here. . .
    else
        //your code to hide that multiboard here. . .
    endif

This will basically run a set of actions specificly and only for Player(0) red 's computer. If he is not a human only the else actions will run otherwise it will only run for the player who is red.
 
Status
Not open for further replies.
Top