Ozzdog
Hopeless Toby Driver fan boy
- Reaction score
- 65
I am making a soccer game. When the ball enters the net, the person who scored the goal gets a point as well as the team (both shown on the leaderboard). But when i test and score a goal, it gives the player who scored +2 points, as well as the team. Not cool. here are my triggers.
Scoring Trigger.
here is that Runnable[b/] trigger, that refreshes the leaderboard.
looks fine to me, but wc3 disagrees (rhyme)
Scoring Trigger.
Code:
Events - Unit - A unit enters South Net <gen>
Conditions - (Entering unit) Equal to Ball 0002 <gen>
(Owner of Kicker) Equal to Player 1 (Red)
Actions - Unit - Move Ball 0002 <gen> instantly to (Center of Outta here <gen>)
Set Score[(Player number of (Owner of Kicker))] = (Score[(Player number of (Owner of Kicker))] + 1)
Set Score[1] = (Score[1] + 1)
Trigger - Run [b]Runnable[/b] <gen> (checking conditions)
here is that Runnable[b/] trigger, that refreshes the leaderboard.
Code:
Events - none
Conditions - none
Actions - Leaderboard - Change the value for Player 1 (Red) in Leader to Score[(Player number of Player 1 (Red))]
Leaderboard - Change the value for Player 2 (Blue) in Leader to Score[(Player number of Player 2 (Blue))]
Leaderboard - Change the value for Player 3 (Teal) in Leader to Score[(Player number of Player 3 (Teal))]
Leaderboard - Change the value for Player 4 (Purple) in Leader to Score[(Player number of Player 4 (Purple))]
Leaderboard - Change the value for Player 5 (Yellow) in Leader to Score[(Player number of Player 5 (Yellow))]
Leaderboard - Change the value for Player 6 (Orange) in Leader to Score[(Player number of Player 6 (Orange))]
Leaderboard - Change the value for Player 8 (Pink) in Leader to Score[1]
Leaderboard - Change the value for Player 9 (Gray) in Leader to Score[2]
Leaderboard - Change the color of the label for Player 8 (Pink) in Leader to (100.00%, 0.00%, 0.00%) with 0.00% transparency
Leaderboard - Change the color of the label for Player 9 (Gray) in Leader to (0.00%, 0.00%, 100.00%) with 0.00% transparency
Leaderboard - Change the color of the value for Player 8 (Pink) in Leader to (100.00%, 100.00%, 0.00%) with 0.00% transparency
Leaderboard - Change the color of the value for Player 9 (Gray) in Leader to (100.00%, 0.00%, 0.00%) with 100.00% transparency
looks fine to me, but wc3 disagrees (rhyme)