| 06-11-2005, 03:58 AM | #1 |
OK, Someone Please help me with leaderboard, what is this, 4th post from me about it? I will post absolutely Everything this time. Create Leaderboard Events Time - Elapsed game time is 5.00 seconds Conditions Actions Leaderboard - Create a leaderboard for (All players) titled Kills Player Group - Pick every player in (All players) and do (Actions) Loop - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions ((Picked player) controller) Equal to User ((Picked player) slot status) Equal to Is playing Then - Actions Leaderboard - Add (Picked player) to (Last created leaderboard) with label (Name of (Picked player)) and value 0 Else - Actions Do nothing Leaderboard - Show (Last created leaderboard) Add PlayerKills Events Unit - A unit Dies Conditions ((Unit-type of (Dying unit)) is A Hero) Equal to True Actions Set Player_Kills[(Player number of (Owner of (Killing unit)))] = Player_Kills[Player_Kills[((Player number of (Owner of (Killing unit))) + 1)]] Leaderboard - Change the value for (Owner of (Killing unit)) in (Last created leaderboard) to Player_Kills[(Player number of (Owner of (Killing unit)))] Leaderboard - Sort (Last created leaderboard) by Value in Descending order NOTE: I've tried this without the condition, working on 2 maps. Variable Player_Kills Name: Player_Kills Type: Integer Array Yes 1 Init Value: 1(Default) OK, Now the Leaderboard Shows, all the players add to the board, but the numbers don't go up when a unit is killed. |
| 06-11-2005, 05:36 AM | #2 |
Please, dont post threads on same topic, specially when your other one is still on first page... I think your problem is here tho Code:
Player_Kills[Player_Kills[((Player number of (Owner of (Killing unit))) + 1)]] it *should* be Code:
Player_Kills[((Player number of (Owner of (Killing unit))) + 1)] |
| 06-11-2005, 03:36 PM | #3 |
I reposted cause this time I figured out how to copy triggers to note. Gonna try that, thanks. |
| 06-11-2005, 03:38 PM | #4 |
no, it should be Code:
set Player_Kills[(Player number of (Owner of (Killing unit)))] = Player_Kills[(Player number of (Owner of (Killing unit)))] + 1 |
| 06-11-2005, 03:51 PM | #5 |
that's what I had...sept I only copied the 2nd part after the = sign :P |
| 06-11-2005, 07:57 PM | #6 |
no, you had the +1 inside the array brackets, which would mean that it would just set the variable to the variable above i in the array, which would mean there would be just lots of 0's flying about |
