1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Show Multiboard to one player

Discussion in 'Triggers & Scripts' started by Roman_legion, Dec 22, 2008.

  1. Roman_legion

    Roman_legion

    Joined:
    Dec 27, 2006
    Messages:
    9
    Resources:
    0
    Resources:
    0
    How do I show a multiboard to one specific player? It sounds ridicously easy, but its harder than one might think.

    Lets say, I have set the specific multiboard to a variable called "Multiboard[1]"
     
  2. GhostWolf

    GhostWolf

    Joined:
    Jul 29, 2007
    Messages:
    4,840
    Resources:
    2
    Tools:
    1
    Tutorials:
    1
    Resources:
    2
    Only 357.214 people asked this question already.

    • Set Player = some player
    • Custom script: if GetLocalPlayer()==udg_Player then
    • // put your leaderboard here
    • Custom script: endif
     
  3. Palaslayer

    Palaslayer

    Joined:
    Jun 16, 2008
    Messages:
    1,779
    Resources:
    66
    Icons:
    62
    Packs:
    1
    Spells:
    2
    Tutorials:
    1
    Resources:
    66
    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?
     
  4. TheBlooddancer

    TheBlooddancer

    Joined:
    Jun 24, 2008
    Messages:
    2,911
    Resources:
    0
    Resources:
    0
    Pala, the reason that we're quite annoyed by this thread, is that if he just read the multiboard tutorial, he would know.
     
  5. Palaslayer

    Palaslayer

    Joined:
    Jun 16, 2008
    Messages:
    1,779
    Resources:
    66
    Icons:
    62
    Packs:
    1
    Spells:
    2
    Tutorials:
    1
    Resources:
    66
    so why not gjust give him the link, lol?
     
  6. GhostWolf

    GhostWolf

    Joined:
    Jul 29, 2007
    Messages:
    4,840
    Resources:
    2
    Tools:
    1
    Tutorials:
    1
    Resources:
    2
    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.
     
  7. Palaslayer

    Palaslayer

    Joined:
    Jun 16, 2008
    Messages:
    1,779
    Resources:
    66
    Icons:
    62
    Packs:
    1
    Spells:
    2
    Tutorials:
    1
    Resources:
    66
    now thats clear ;)
     
  8. ZlatniLav

    ZlatniLav

    Joined:
    Dec 13, 2008
    Messages:
    196
    Resources:
    0
    Resources:
    0
    I think that multiboard can't be an array.
     
  9. Airandius

    Airandius

    Joined:
    Jun 12, 2007
    Messages:
    1,238
    Resources:
    3
    Icons:
    1
    Maps:
    1
    Tutorials:
    1
    Resources:
    3
    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
     
  10. Soga-

    Soga-

    Joined:
    Jul 20, 2008
    Messages:
    374
    Resources:
    0
    Resources:
    0
    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.
     
  11. Airandius

    Airandius

    Joined:
    Jun 12, 2007
    Messages:
    1,238
    Resources:
    3
    Icons:
    1
    Maps:
    1
    Tutorials:
    1
    Resources:
    3
    Hmm, where is it then? I could not find a GUI tutorial about that.
     
  12. Soga-

    Soga-

    Joined:
    Jul 20, 2008
    Messages:
    374
    Resources:
    0
    Resources:
    0
  13. Airandius

    Airandius

    Joined:
    Jun 12, 2007
    Messages:
    1,238
    Resources:
    3
    Icons:
    1
    Maps:
    1
    Tutorials:
    1
    Resources:
    3
    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?
     
  14. Soga-

    Soga-

    Joined:
    Jul 20, 2008
    Messages:
    374
    Resources:
    0
    Resources:
    0
    Create the multiboard normally, and ONLY display it locally.