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 haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Lead your forces to battle in the 15th Techtree Contest. The call is yours, commander!
    Dismiss Notice
  4. The reforging of the races is complete. Come see the 14th Techtree Contest Results.
    Dismiss Notice
  5. It's time to choose your horse in the race - the 32nd Modeling Contest Poll is up!
    Dismiss Notice
  6. 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.

[Trigger] Creating a Scoreboard

Discussion in 'Triggers & Scripts' started by Phire126, Aug 16, 2007.

  1. Phire126

    Phire126

    Joined:
    Jul 8, 2007
    Messages:
    147
    Resources:
    1
    Maps:
    1
    Resources:
    1
    How does one create on of those "scoreboards" for a game to like display kill and stuff (I want mine to display unit counts) I thought they were leader boards but I'm having trouble figuring it out.
     
  2. Lingonberryjam

    Lingonberryjam

    Joined:
    Feb 25, 2005
    Messages:
    230
    Resources:
    0
    Resources:
    0
    They are called 'Multiboards' (yep i thought they were leaderboards aswell).

    Word Editor --> Trigger Editor --> Multiboard *Here are the actions*

    You should remember that multiboards can't be created at map initialization, have it created after a few seconds or so.

    To show you how a simple multiboard is created, i'll paste a trigger here soon:

    • Create Multiboard -Example-
      • Events
        • Time - Elapsed game time is 5.00 seconds
      • Conditions
      • Actions
        • Multiboard - Create a multiboard with 3 columns and 14 rows, titled The Multiboard
        • Set TheMultiboard = (Last created multiboard)
        • Multiboard - Set the display style for TheMultiboard item in column 0, row 0 to Show text and Hide icons
        • Multiboard - Set the width for TheMultiboard item in column 0, row 0 to 4.00% of the total screen width
        • Multiboard - Set the width for TheMultiboard item in column 1, row 0 to 10.00% of the total screen width
        • Multiboard - Set the text for TheMultiboard item in column 1, row 1 to Player
        • Multiboard - Set the text for TheMultiboard item in column 2, row 0 to 0
        • Multiboard - Set the text for TheMultiboard item in column 2, row 1 to Kills
        • Multiboard - Set the text for TheMultiboard item in column 3, row 0 to 0
        • Multiboard - Set the text for TheMultiboard item in column 3, row 1 to Deaths
        • Multiboard - Set the text for TheMultiboard item in column 0, row 2 to <Empty String>
        • For each (Integer A) from 1 to 12, do (Actions)
          • Loop - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • ((Player((Integer A))) slot status) Equal to Is playing
              • Then - Actions
                • Multiboard - Set the text for TheMultiboard item in column 1, row (2 + (Integer A)) to (Name of (Player((Integer A))))
              • Else - Actions
                • Multiboard - Set the text for TheMultiboard item in column 1, row (2 + (Integer A)) to -Not Playing-
        • Wait 1.00 seconds
        • Multiboard - Show TheMultiboard
        • Multiboard - Minimize TheMultiboard


    Note: Using 0 as a row/column value affects all rows/columns

    Hope it helped, you can take it from here i guess.
     
    Last edited: Aug 16, 2007
  3. Phire126

    Phire126

    Joined:
    Jul 8, 2007
    Messages:
    147
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Would a leaderboard work if i only want say player 1 to see it?
     
  4. Lingonberryjam

    Lingonberryjam

    Joined:
    Feb 25, 2005
    Messages:
    230
    Resources:
    0
    Resources:
    0
    I dont think so. I cant find a way to show the multiboard to only one player...
     
  5. Portkins

    Portkins

    Joined:
    May 9, 2007
    Messages:
    13
    Resources:
    0
    Resources:
    0
    Great tutorial Lingon... Bumped because it helped so much.
     
  6. PurplePoot

    PurplePoot

    Joined:
    Dec 14, 2005
    Messages:
    11,161
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    • Custom script: if GetLocalPlayer() == PlayerToDisplayTheMultiboardTo then
    • Multiboard - Display TheMultiboard
    • Custom script: endif


    Eg: (note: players are 1 less in jass (p0 = red, p1 = blue, etc))

    • Custom script: if GetLocalPlayer() == Player( 0 ) then
    • Multiboard - Display TheMultiboard
    • Custom script: endif


    Would display it to only p1