On my map I got this leaderboard that counts all hero kills made and also whenever team 1(player 6 orange) or team 2 (player 12 brown)
However all it does for both the kills score and team wins is counting up to 1 and then it doesn't count any further.
I have no idea what the problem is, tried to fix it but with no results, anyways heres the triggers:
And here is the kill trigger for team 1 heroes:
Help is appreciated :thup:
However all it does for both the kills score and team wins is counting up to 1 and then it doesn't count any further.
I have no idea what the problem is, tried to fix it but with no results, anyways heres the triggers:
Code:
Creation of leaderboard
Events
Time - Elapsed game time is 5.00 seconds
Conditions
Actions
Leaderboard - Create a leaderboard for (All players) titled Hero kills
Leaderboard - Add Player 6 (Orange) to (Last created leaderboard) with label Team 1 Wins and value 0
Leaderboard - Add Player 12 (Brown) to (Last created leaderboard) with label Team 2 Wins and value 0
Custom script: set bj_wantDestroyGroup=true
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)
And here is the kill trigger for team 1 heroes:
Code:
Leaderboard killcount for team1
Events
Unit - A unit Dies
Conditions
((Killing unit) belongs to an ally of Player 1 (Red)) Equal to True
((Dying unit) is A Hero) Equal to True
((Dying unit) belongs to an enemy of Player 1 (Red)) Equal to True
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
Help is appreciated :thup: