• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[General] Multiboard

Status
Not open for further replies.
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

Okay I tried to bring my GUI skills back, since I don't know if you know jass that good:

1) We create the Multiboard. But the most important thing is here, that the created survivors/enemies gets stored into a variable!
  • Trigger1
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Multiboard - Create a multiboard with 2 columns and 12 rows, titled Multiboard
      • Set Multiboard = (Last created multiboard)
      • Multiboard - Minimize Multiboard
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • For each (Integer B) from 1 to 2, do (Actions)
            • Loop - Actions
              • Multiboard - Set the display style for Multiboard item in column (Integer B), row (Integer A) to Show text and Hide icons
              • Multiboard - Set the width for Multiboard item in column (Integer B), row (Integer A) to 6.00% of the total screen width
          • Multiboard - Set the text for Multiboard item in column 1, row (Integer A) to (Name of (Player((Integer A))))
          • Multiboard - Set the text for Multiboard item in column 2, row (Integer A) to Alive
      • Multiboard - Maximize Multiboard
      • -------- now we create the survivors --------
      • Set TempPoint = (Center of (Playable map area))
      • 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
              • (Integer A) Less than 11
            • Then - Actions
              • Unit - Create 1 Peasant for (Player((Integer A))) at TempPoint facing Default building facing degrees
            • Else - Actions
              • Unit - Create 1 Abomination for (Player((Integer A))) at TempPoint facing Default building facing degrees
          • Set Survivors[(Integer A)] = (Last created unit)
      • Custom script: call RemoveLocation(udg_TempPoint)
2) Now we check (at least I did) if the current stored unit is dead, one of all players left the game or one of all played are not controlled my user:

  • Trigger2
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • 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
              • Or - Any (Conditions) are true
                • Conditions
                  • ((Player((Integer A))) controller) Not equal to User
                  • ((Player((Integer A))) slot status) Not equal to Is playing
                  • (Survivors[(Integer A)] is alive) Not equal to True
            • Then - Actions
              • Multiboard - Set the text for Multiboard item in column 2, row (Integer A) to Dead
            • Else - Actions
Well I just created the multiboard very fast, but I tested it and it seems to work, so I hope its okay how it is =D

Greetings and Peace
Dr. Boom
 
Status
Not open for further replies.
Top