Shimergloom
New Member
- Reaction score
- 6
My leaderboard counts hero/unit kills and displays it for each active player but it only actually counts Red's kills then displays it for all players. It's seperated into 3 triggers. Just need to get it to count and display the kills of the individual players.
PHP:
Make Board
Events:
Map initialization
Actions:
Wait 5.00 seconds
Leaderboard - Create a leaderboard for (All players) titled Hero Kill Differential
Player Group - Pick every player in (All players) and do (If ((((Picked player) controller) Equal to User) and (((Picked player) slot status) Equal to Is playing)) then do (Leaderboard - Add (Picked player) to (Last created leaderboard) with label (Name of (Picked player)) and value 0) else do (Do nothing))
PHP:
Adjust Score Hero Kill
Events:
Unit - A unit owned by Player 1-11 Dies
Conditions:
((Dying unit) is A Hero) Equal to True
Actions:
Set leaderboarddeaths[(Player number of (Owner of (Dying unit)))] = (leaderboarddeaths[(Player number of (Owner of (Dying unit)))] - 1)
Set leaderboarddeaths[(Player number of (Owner of (Killing unit)))] = (leaderboarddeaths[(Player number of (Owner of (Killing unit)))] + 1)
Leaderboard - Sort playerkillleader by Value in Descending order
PHP:
Adjust Score Unit Kill
Events:
Unit - A unit owned by Player 10 (Light Blue) Dies
Unit - A unit owned by Player 12 (Brown) Dies
Actions:
Set unitkills[(Player number of (Owner of (Killing unit)))] = (unitkills[(Player number of (Owner of (Killing unit)))] + 1)
Leaderboard - Sort unitkillleader by Value in Descending order