• 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] Simple Leaderboard Problem

Status
Not open for further replies.

Deleted member 177737

D

Deleted member 177737

Hey,

I'm trying to make a simple leader board that count's how many "Crystals" player 1 has destroyed. I've already finished all the triggers, but the one that makes the number go up by 1 when the "Crystal" is destroyed won't work no matter how many different ways I make it.

Leader Board Trigger:
This trigger is activated when the player presses the quest accept button from another trigger.
  • Events
  • Conditions
  • Actions
    • Leaderboard - Create a leaderboard for Player Group - Player 1 (Red) titled Destroy the Crystal...
    • Leaderboard - Add Player 1 (Red) to (Last created leaderboard) with label Crystals Destroyed and value 0
    • Leaderboard - Show (Last created leaderboard)
Leader Board Update Trigger:
  • Events
    • Unit - A unit Dies
  • Conditions
    • (Unit-type of (Dying unit)) Equal to Peasant
  • Actions
    • Leaderboard - Change the value for Player 1 (Red) in (Last created leaderboard) to (Playerkills[1] + 1)
    • Leaderboard - Sort (Last created leaderboard) by Value in Descending order
 
You never increment playerkills.

  • Events
    • Unit - A unit Dies
  • Conditions
    • (Unit-type of (Dying unit)) Equal to Peasant
  • Actions
    • Set Playerkills[1] = (Playerkills[1] + 1)
    • Leaderboard - Change the value for Player 1 (Red) in (Last created leaderboard) to Playerkills[1]
    • Leaderboard - Sort (Last created leaderboard) by Value in Descending order
 

Deleted member 177737

D

Deleted member 177737

^.^ Thx a ton, it all works now!
 
Status
Not open for further replies.
Top