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

[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.
Top