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

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