Setting Up A Leaderboard
Ok, phew, now that we have moving triggers out of the way, lets move onto Leaderboards. Yes, those fancy leaderboards. Here is how you make them.
Events
Map Initilization
Conditions
None
Actions\
Leaderboard-Create-Creat a leaderboard for (All Players) titled Kills.
If/Then/Else- If (Player Slot Status Comparison- Player 1 (Red) Slot Status Equal To Is Playing) Then (Leaderboard- Add Player-Add Player 1(Red) to (Last Created Leaderboard) with label 'Name Of Player 1(Red)' and value of 0, Else (Do Nothing)
You need to copy + paste the 'If/Then/Else' trigger and subsitute Player 1 with player 2, Player 3, Player 4, and so on.
Here is how u add kills to your leaderboard. A bit complicated but not too hard to figure out.
You need to add a variable though.
Name: Kills
Type: Integer Array
Initial Value: 0
Events
Unit-Unit Dies- A unit owned by Player 12 dies
Conditions
Integer Comparison- Lives Is Not Equal To 0
Actions
Set Kills[Player Number Of(Owner of Killing Unit)))] = Kills[Player Number of(Oner of Killing Unit)))] + 1
Leaderboard- Change the value for (Owner of(Killing Unit)) in (Last Created Leaderboard) to Kills[Player Number Of(Owner Of(Killing Unit)))]
Leaderboard-Sort-Sort (Last Created Leaderboard) By Value In Descending Order
If a player leaves this is the trigger you need to run.
Events
Time-Periodic Event- Every 5.00 seconds of game time
Conditions
None
Actions
If/Then/Else- If (Player Slot Status Comparison Player 1(Red) Slot Status Equal To Has Left The Game), Then (Leaderboard-Change Player Label- Change the lable for Player 1(Red) in (Last Created Leaderboard) to <Quit the game> ), Else (Do Nothing)
Once again, like you have done so many times before, you must copy + paste and make this for each human player.