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

[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