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

Show Multiboard to one player

Status
Not open for further replies.
Level 24
Joined
Jun 16, 2008
Messages
1,939
u should explain it a little more i think otherwise he will just type it in and maybe dont know how it really works

thats why people ask the damn question again and again...
i dont like how u interac with other people lol...
this might be the 5th time i see u writing that 1294439752847 of people ask that before

EDIT: I am not a beginner with GUI but wouldnt understand what u wanted me to tell, lol, what ya mean with the damn put ur leaderboard here.
shall this be a jass function or what?
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Every thread that I type that kind of sentence in has at least been asked for 10+ times and can be searched pretty easily with the search button.
If there is even a tutorial on this... god... it's only more lame.

If you're too lame to search either of them, read on.

GetLocalPlayer() returns the player that the script is currently running to (Warcraft runs all the triggers for player 0 (red), then for player 1 (blue), etc).
If you say something like if GetLocalPlayer() == Player(0) then you are checking when the script is running for the Red player.
Now if you show stuff like effects, leader/multi boards, and lot's of things only when the script is running for a certain player - it will only show it to him.
But be warned, CREATING stuff only for one player will most likely cause a desync and cause your game to split.
 
Level 17
Joined
Jun 12, 2007
Messages
1,261
So this way is correct?

Event:
Player 1 Red types: -s
Player 2 Blue types: -s
Actions:
Set Player = Triggering Player
Custom script: if GetLocalPlayer()==udg_Player then
Show MultibaordStats[playernumber of triggering player]
Custom script: endif

And how do you update it? Do you need to do the GetLocalPlayer thing aswell? Or can you just update stats for the itting multibaord? xD
 
Level 7
Joined
Jul 20, 2008
Messages
377
So this way is correct?

Event:
Player 1 Red types: -s
Player 2 Blue types: -s
Actions:
Set Player = Triggering Player
Custom script: if GetLocalPlayer()==udg_Player then
Show MultibaordStats[playernumber of triggering player]
Custom script: endif

And how do you update it? Do you need to do the GetLocalPlayer thing aswell? Or can you just update stats for the itting multibaord? xD
If I recall, creating (and possibly changing) handles locally is what causes desyncs.

So no, you should only use GetLocalPlayer() to show that Multiboard in the first place, then you're done. Just set everything else normally.

However, there are a few dirty tricks you can do with GetLocalPlayer(). Look through the tutorials.
 
Level 17
Joined
Jun 12, 2007
Messages
1,261
If I recall, creating (and possibly changing) handles locally is what causes desyncs.

So no, you should only use GetLocalPlayer() to show that Multiboard in the first place, then you're done. Just set everything else normally.

However, there are a few dirty tricks you can do with GetLocalPlayer(). Look through the tutorials.

Hmm, where is it then? I could not find a GUI tutorial about that.
 
Level 17
Joined
Jun 12, 2007
Messages
1,261
Creating a handle for a single player using GetLocalPlayer() will cause a desync. Creating something new which is synced with all players, while out of sync, is just plain stupid. (Unless you want to disconnect someone...)

So wtf?
Should I create a multiboard in a different part for the trigger and then show it inside the GetLocalPlayer()?
Or should I create it inside the GetLocalPlayer()?

Like which one does not cause a desync?
 
Status
Not open for further replies.
Top