• 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] 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