Xebarsis
New Member
- Reaction score
- 7
Hmmm... not quite sure why this trigger isn't working, but it's not. Whenever you kill a unit owned by a user that isn't a summon then you're supposed to get 1 point, but it's not updating. Here's my trigger:
Code:
Part 1
Events
Time - Elapsed game time is 5.00 seconds
Conditions
Actions
Leaderboard - Create a leaderboard for (All players controlled by a User player) titled Kills (50 to win)
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Leaderboard - Add (Picked player) to (Last created leaderboard) with label (Name of (Picked player)) and value 0
Leaderboard - Show (Last created leaderboard)
Leaderboard - Sort (Last created leaderboard) by Value in Ascending order
Code:
Part 2
Events
Unit - A unit Dies
Conditions
((Owner of (Dying unit)) controller) Equal to User
((Dying unit) has buff Animate Dead) Equal to False
(Owner of (Dying unit)) Not equal to (Owner of (Dying unit))
Actions
Set Kills[(Player number of (Owner of (Killing unit)))] = (Kills[(Player number of (Owner of (Killing unit)))] + 1)
Leaderboard - Change the value for (Owner of (Killing unit)) in (Last created leaderboard) to Kills[(Player number of (Owner of (Killing unit)))]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Kills[(Player number of (Owner of (Killing unit)))] Equal to 50
Then - Actions
Set Victory = 1
Unit - Pause all units
Game - Display to (All players) the text: (We have a winner! Congratulations to + ((Name of (Owner of (Killing unit))) + !))
Wait 7.00 seconds
Game - Victory (Owner of (Killing unit)) (Show dialogs, Show scores)
Player Group - Pick every player in (All enemies of (Owner of (Killing unit))) and do (Game - Defeat (Picked player) with the message: (You have lost the game to + ((Name of (Owner of (Killing unit))) + !)))
Else - Actions
Do nothing