• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Leaderboard help

Status
Not open for further replies.
Level 3
Joined
Nov 17, 2009
Messages
42
Ok im trying to get leaderboards working, iv been useing the tutorial here on hive.

I got the first trigger working good and all, but the second one I seem to be having compilations.

  • Untitled Trigger 001
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Leaderboard - Create a leaderboard for (All players) titled Score
      • 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 Player 1 (Red) to (Last created leaderboard) with label (Name of (Picked player)) and value 0
            • Else - Actions
      • Leaderboard - Show (Last created leaderboard)
That one works but this one..


  • Untitled Trigger 002
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) belongs to an enemy of (Owner of (Killing unit))) Equal to True
    • Actions
      • Set PlayerKills[(Player number of (Owner of (Killing unit)))] = PlayerKills[((Player number of (Owner of (Killing unit))) + 1)]
      • Leaderboard - Change the value for (Owner of (Killing unit)) in (Last created leaderboard) to (Player number of (Owner of (Killing unit)))
      • Leaderboard - Sort (Last created leaderboard) by Value in Descending order
The second action I dont know how to get it to match this one.

  • Leaderboard - Change the value for (Owner of (Killing unit)) in (Last created leaderboard) to PlayerKills[(Player number of (Owner of (Killing unit)))]
I well give +rep to people that help :D
 
Level 13
Joined
Jun 22, 2004
Messages
783
well at the moment you still have the action

  • Leaderboard - Change the value for (Owner of (Killing unit)) in (Last created leaderboard) to (Player number of (Owner of (Killing unit)))
in your trigger, you'd want to alter that with the action you presented in your last example.
 
Level 3
Joined
Nov 17, 2009
Messages
42
How do you get the variables working, in the second trigger, the variables dont show as usable.
 
Level 3
Joined
Apr 29, 2009
Messages
32
  • Leaderboard - Change the value for (Owner of (Killing unit)) in (Last created leaderboard) to (Player number of (Owner of (Killing unit)))
At the (Player number of (Owner of Killing unit))) enable variable and choose variable PlayerKills. Array should turn up ([]) Do the (Player number of (Owned of Killing unit))) in the array.

Though if you don't have the variable yet just create it: Integer Array
 
Status
Not open for further replies.
Top