• 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.

Help With leaderboard!!!!!

Status
Not open for further replies.
Level 5
Joined
Jun 18, 2004
Messages
136
how do i make a leaderboard for my foot wars map? and if you have any ideas of stuff i could do in it i will credit you if you tell me. thx ---AlphaChicken---
 
Level 2
Joined
May 31, 2004
Messages
6
You mean a kill counter? Well first create a integer array variable (called mine kills).


Create 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 do (Leaderboard - Add (Picked player) to (Last created leaderboard) with label (Name of (Picked player)) and value 0)
--- Leaderboard - Show (Last created leaderboard)

kill
-- Events
--- Unit - A unit owned by Player 1 (Red) Dies
--- Unit - A unit owned by Player 2 (Blue) Dies
<Continue for all 12 players>
-- Conditions
-- Actions
--- Set kills[(Player number of (Owner of (Killing unit)))] = (kills[(Player number of (Owner of (Killing unit)))] + 1)
--- Leaderboard - Change the value for (Owner of (Killing unit)) in (Last created leaderboard) to kills[(Player number of (Owner of (Killing unit)))]
--- Leaderboard - Sort (Last created leaderboard) by Value in Descending order

That should work
 
Status
Not open for further replies.
Top