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

[Trigger] Team Kills Leaderboard

Status
Not open for further replies.
Level 6
Joined
Aug 27, 2008
Messages
182
I'm going to make a leaderboard showing the kills of a team, but how?

When a hero of team 2 dies the leaderboard should add 1 to the kill count on the leader board, and the other way.

Can anyone show me how to do this AND how to create the leaderboard. I got no idea.

:bored:
 
  • Events
    • Whatever you want, BUT NOT (Map Initialization)
  • Actions
    • Leaderboard - Create ...
    • Set lb = (Last Created Leaderboard)
Now add every player you want with Leaderboard - Add Player

Have an integer array variable to store all player's score.
So, whenever a unit dies, add 1 to yourvar[(Player number of (Owner of (Trigering Unit)))] and change that player's value to it.

I recommend:
  • Events
    • Unit - A unit dies
  • Conditions
    • Whatever you want
  • Actions
    • Set tmpPlayer = Owner of (Triggering Unit)
    • Set tmpInteger = Player number of (tmpPlayer)
    • Set yourVar[tmpInteger] = yourVar[tmpInteger] + 1
    • Leaderboard - Change the value for tmpPlayer in lb to yourVar[tmpInteger]
 
Status
Not open for further replies.

Similar threads

Top