• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Variables and Leaderboard trouble

Status
Not open for further replies.
Level 4
Joined
Aug 2, 2007
Messages
69
I'm having trouble with the leaderboard adding points. The game is where one unit enters the goal region with the ball. Once he enters that region, that team gets 1 point.

Here are the triggers I have in play, I can't seem to figure out what I'm doing is wrong:

Leaderboard:
  • Create
  • Events
  • Time - Elapsed game time is 5.00 seconds
  • Conditions
  • Actions
  • Leaderboard - Create a leaderboard for (All Players) titled 5 Goals to Win
  • Leaderboard - Show (Last created leaderboard)
  • Leaderboard - Add Player 1(Red) to (Last created leaderboard) with label Red Team and value RedScore
  • Leaderboard - Add Player 2(Blue) to (Last created leaderboard) with label Red Team and value BlueScore
Player Example Scores:
  • Player 3 Scores
  • Events
  • Unit - A unit enters Blue Goal <gen>
  • Conditions
  • (Owner of(Triggering Unit)) Equal to Player 3(Teal)
  • Actions
  • Set Player3Goals = (Player3Goals + 1)
Adding to Leaderboard:
  • Red Team Total
  • Events
  • Time - Every 2.00 seconds of game time
  • Conditions
  • Actions
  • Set RedScore = (Player3Goals + (Player4Goals + (Player5Goals + (Player7Goals))))
Also, would this condition work for the 2nd trigger above, in order to make it so that they have the ball in order to score?:

  • Player 3 Scores
  • Conditions
  • (Owner of (Triggering Unit)) Equal to Player 3 (Teal)) and ((Item carried by (Triggering Unit) in slot 1) Equal to Ball)
 
Level 9
Joined
Apr 3, 2008
Messages
700
You change the value of variable but you don't refresh info in leaderboard. You need to repeat this action in the trigger where you change the score (variable value).
  • Leaderboard - Change the value for (<Picked player>) in (Last created leaderboard) to <Variable>
P.S. Multiboards are better.
 
Status
Not open for further replies.
Top