• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Need Help with Leaderbord Triggers

Status
Not open for further replies.
Level 15
Joined
Aug 11, 2009
Messages
1,606
Create these variables:1) Chances - Integer - 10
2) LEADERBOARD - leaderboard
And use these triggers:
  • CreateLeaderboard
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Leaderboard - Create a leaderboard for (All players) titled Life Board
      • Set LEADERBOARD = (Last created leaderboard)
      • Leaderboard - Add Player 1 (red) to LEADERBOARD with label Lifes and value Chances

  • Deaths
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Dying unit)) Equal to Player 1 (Red)
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set Chances = (Chances - 1)
      • Leaderboard - Change the value for Player 1 (Red) in LEADERBOARD to Chances
      • Game - Display to (All players) the text: (|c00FF0000Warning!|r + ((String(Chances)) + |c00FF0000lifes left!|r))

  • Defeat
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
      • Chances Less than or equal to 0
    • Actions
      • Player Group - Pick every player in (All players controlled by a User player) and do (If (((Picked player) slot status) Equal to Is playing) then do (Game - Defeat (Picked player) with the message: Defeat!Try again!) else do (Do nothing))

Here is the trigger...hope it helps your brother Mulgrim!
 
Last edited:
Status
Not open for further replies.
Top