T]i[T]a[N
New Member
- Reaction score
- 0
I have a kills leaderboard here that Ive developed and cant figure out why the kills wont tally... can anyone help me?
Code:
Leaderboard
Events
Time - Elapsed game time is 1.00 seconds
Conditions
Actions
Leaderboard - Create a leaderboard for (All players) titled Kills:
Player Group - Pick every player in (All players matching ((((Matching player) slot status) Equal to Is playing) and (((Matching player) controller) Equal to User))) and do (Actions)
Loop - Actions
Leaderboard - Add (Picked player) to (Last created leaderboard) with label (Name of (Picked player)) and value 0
Leaderboard - Show (Last created leaderboard)
Code:
Kills Tally
Events
Unit - A unit Dies
Conditions
(((Matching player) slot status) Equal to Is playing) and (((Matching player) controller) Equal to User)
Actions
Set Player_Kills[(Player number of (Owner of (Killing unit)))] = (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