Carnerox
The one and only.
- Reaction score
- 84
I'm having a slight problem with my Leaderboard, it pretty much works but it only list one player and doesn't add any other Players to the Leaderboard besides Player(1).
+rep for who helps me. :thup:
Variables:
Player Count = 0 <Integer>
Leaderboard = No Leaderboard <Leaderboard>
Update Timer = (New Timer) <Timer>
Kills = 0 <Integer[17]>
Lives = 40 <Integer>
+rep for who helps me. :thup:
Trigger:
- Count Players
- Events
- Game - Map initialization
- Local Variables
- Conditions
- Actions
- Player Group - Pick each player in (Active Players) and do (Actions)
- Actions
- Variable - Modify Player Count: + 1
- Actions
- Trigger - Run Create Leaderboard (Ignore Conditions, Don't Wait until it finishes)
- Player Group - Pick each player in (Active Players) and do (Actions)
- Events
Trigger:
- Create Leaderboard
- Events
- Local Variables
- Conditions
- Actions
- Leaderboard - Create a leaderboard with 4 columns and (Player Count + 3) rows, with the name "Leaderboard", and using (100%, 100%, 100%) color.
- Variable - Set Leaderboard = (Last created leaderboard)
- Leaderboard - Set Leaderboard item text at column 1 and row 1 to "Players"
- Leaderboard - Set Leaderboard item icon at column 1 and row 1 to Assets\Textures\btn-ability-terran-scannersweep-color.dds, placing it on the Left side of the text
- Leaderboard - Set Leaderboard item text at column 2 and row 1 to "Minerals"
- Leaderboard - Set Leaderboard item icon at column 2 and row 1 to Assets\Textures\icon-mineral.dds, placing it on the Left side of the text
- Leaderboard - Set Leaderboard item text at column 3 and row 1 to "Kills"
- Leaderboard - Set Leaderboard item icon at column 3 and row 1 to Assets\Textures\btn-ability-terran-snipe-color.dds, placing it on the Left side of the text
- Leaderboard - Set Leaderboard item text at column 1 and row (Player Count + 2) to "Level:"
- Leaderboard - Set Leaderboard item text at column 1 and row (Player Count + 3) to "Lives:"
- Leaderboard - Set Leaderboard item text at column 2 and row (Player Count + 2) to (Text(Level))
- Leaderboard - Set Leaderboard item text at column 2 and row (Player Count + 3) to (Text(Lives))
- Timer - Start Update Timer as a Repeating timer that will expire in 0.04 AI Time seconds
- Trigger - Turn Update Leaderboard On
Trigger:
- Update Leaderboard
- Events
- Timer - Update Timer expires
- Local Variables
- Player = 1 <Integer>
- Position = 2 <Integer>
- Conditions
- Not
- Conditions
- Player > Player Count
- Conditions
- Not
- Actions
- General - For each integer Player from 1 to Player Count with increment 1, do (Actions)
- Actions
- Leaderboard - Set Leaderboard item text at column 1 and row Position to (Text (Name of player Player) with color (Color((Current player Player color))))
- Leaderboard - Set Leaderboard item text at column 2 and row Position to (Text((Player Player Minerals)))
- Leaderboard - Set Leaderboard item text at column 3 and row Position to (Text(Kills[Player]))
- Actions
- Leaderboard - Set Leaderboard item text at column 2 and row (Player Count + 2) to (Text(Level))
- Leaderboard - Set Leaderboard item text at column 2 and row (Player Count + 3) to (Text(Lives))
- Variable - Modify Player: + 1
- Variable - Modify Position: + 1
- General - For each integer Player from 1 to Player Count with increment 1, do (Actions)
- Events
Variables:
Player Count = 0 <Integer>
Leaderboard = No Leaderboard <Leaderboard>
Update Timer = (New Timer) <Timer>
Kills = 0 <Integer[17]>
Lives = 40 <Integer>