• 🏆 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!

how do i make a leaderboard? help here

Status
Not open for further replies.
Level 3
Joined
Sep 29, 2005
Messages
39
erm hi, can anyone teach me how do i make a leaderboard, pls explain it clearly and full details like what vairbles and the trigger. cost i copy a leaderboard from some map, and the player 1 score is imbalance it jumps from 1 point to 5 point per kill.

anyone help me , THANK YOU
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
Well, 2 triggers will work

you need an array integer called PlayerKills for my example, and a leaderboard variable called ldr

Trigger 1
--------------------------------------------------
Events
Time - Elapsed Game Time is 0.01 Seconds
Conditions
(none)
Actions
Leaderboard - Clear ldr
Leaderboard - Create A Leaderboard Titled Kills
Set ldr = Last Created Leaderboard
Player Group - Pick Every Player in ( all players ) and do actions
Loop - Actions
Set PlayerKills[Player Number of Picked Player] = 0
Leaderboard - Set the value for Player 1 - PlayerKills[Player Number of Picked Player]

--------------------------------------------------Trigger 2
--------------------------------------------------
Events
Unit - A Unit Dies
Conditions
(none)
Actions
Set PlayerKills[Player Number of Owner of Killing Unit] to PlayerKills[Player Number of Owner of Killing Unit] + 1
Leaderboard - Set the value for Owner of Killing Unit to PlayerKills[Player Number of Owner of Killing Unit]
--------------------------------------------------
thats all there is to making a simple Leaderboard ( in this case Kills )!
 
Status
Not open for further replies.
Top