• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

I need help

Status
Not open for further replies.
This is the trigger that creates the leaderboard and sets it as variable "GameSTATS" or watever you want it to be.

  • Leaderboard create
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Leaderboard - Create a leaderboard for (All players) titled Hero Kills
      • Set GameSTATS = (Last created leaderboard)
      • Player Group - Pick every player in (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing))) and do (Actions)
        • Loop - Actions
          • Leaderboard - Add (Picked player) to GameSTATS with label (Name of (Picked player)) and value 0
This trigger updates it using the variable "HeroKills" which is an array of size 10 (for 10 players. As long as its above the number you need then it will work)

  • Leaderboard update
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • (Owner of (Dying unit)) Not equal to (Owner of (Killing unit))
    • Actions
      • Set HeroKills[(Player number of (Owner of (Killing unit)))] = (HeroKills[(Player number of (Owner of (Killing unit)))] + 1)
      • Leaderboard - Change the value for (Owner of (Killing unit)) in GameSTATS to HeroKills[(Player number of (Owner of (Killing unit)))]
      • Leaderboard - Sort GameSTATS by Value in Descending order
The second condition in this trigger is so you cant kill your own hero to get a point.

This trigger changes their name to "---QUIT---" if they leave.

  • Leavers
    • Events
      • Player - Player 1 (Red) leaves the game
      • Player - Player 2 (Blue) leaves the game
      • Player - Player 3 (Teal) leaves the game
      • Player - Player 4 (Purple) leaves the game
      • Player - Player 5 (Yellow) leaves the game
      • Player - Player 6 (Orange) leaves the game
      • Player - Player 7 (Green) leaves the game
      • Player - Player 9 (Gray) leaves the game
      • Player - Player 10 (Light Blue) leaves the game
    • Conditions
    • Actions
      • Leaderboard - Change the label for (Triggering player) in (Last created leaderboard) to ---QUIT---
-Hope this helps:thumbs_up:
 
Status
Not open for further replies.
Back
Top