Leaderboard help.. triggers included.

xiFackx

Member
Reaction score
1
I'm trying to make a leader board that adds kills for each dead unit.. i can't seem to find out WHY its not adding the kills... any help?
Heres the trigger to add players, and created leaderboard
Trigger:
  • players
    • Events
      • Time - Elapsed game time is 0.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 (Triggering player)) and value 0
            • Else - Actions
      • Leaderboard - Show (Last created leaderboard)


Heres the trigger to add the kills

Trigger:
  • Counting
    • Events
      • Unit - A unit Dies
    • Conditions
    • 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
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
This line:
Trigger:
  • Set Player_Kills[(Player number of (Owner of (Killing unit)))] = Player_Kills[(Player_Kills[(Player number of (Owner of (Killing unit)))] + 1)]

should be changed to this:
Trigger:
  • Set Player_Kills[(Player number of (Owner of (Killing unit)))] = (Player_Kills[(Player number of (Owner of (Killing unit)))] + 1)


In your current trigger Player_Kills[X] is at a default of 0, so Player_Kills[ (Player_Kills[X]) ] will be Player_Kills[0], which doesn't exist.
 

xiFackx

Member
Reaction score
1
I'm still confused on how to fix this... can you help me a little more..

.. sorry if this is stupid :/

EDIT: i got it.. i think
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top