• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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