- Joined
- May 25, 2016
- Messages
- 15
Hi! I'm trying to make a dying player switch alliances to ally with player12(brown) and brown's allies, and unally everyone else. I'd also like to remove the dying player from the human leaderboard, and add them to an undead leaderboard.
Both triggers run when they are supposed to, so the problem isn't in events or conditions, its in the actions.
When in game the first leaderboard for humans works, but when a human dies they aren't removed from the human leaderboard, they aren't added to the undead leaderboard, and player12(undead) gives control, and then instantly removes control.
Can anyone help please?
This is the starting resources/leaderboard trigger at the beginning of the game:
Both triggers run when they are supposed to, so the problem isn't in events or conditions, its in the actions.
When in game the first leaderboard for humans works, but when a human dies they aren't removed from the human leaderboard, they aren't added to the undead leaderboard, and player12(undead) gives control, and then instantly removes control.
Can anyone help please?
This is the starting resources/leaderboard trigger at the beginning of the game:
-
Set Starting Resources and leaderboard
-
Events
-
Time - Elapsed game time is 3.00 seconds
-
-
Conditions
-
Actions
-
Melee Game - Limit Heroes to 1 per Hero-type (for all players)
-
Leaderboard - Create a leaderboard for Player Group - Player 12 (Brown) titled Undead Kills
-
Leaderboard - Add Player 12 (Brown) to (Last created leaderboard) with label Brown and value 0
-
Leaderboard - Create a leaderboard for (All players) titled Human Income (Every...
-
Player Group - Pick every player in (All players) and do (Actions)
-
Loop - Actions
-
If (((Picked player) controller) Equal to User) then do (Leaderboard - Add (Picked player) to (Last created leaderboard) with label (Name of (Picked player)) and value 0) else do (Do nothing)
-
-
-
Player Group - Pick every player in (All enemies of Player 12 (Brown)) and do (Actions)
-
Loop - Actions
-
Player - Set (Picked player) Current gold to 50
-
Unit - Create 3 Peasant for (Picked player) at (Random point in Human Playable area <gen>) facing Default building facing degrees
-
Unit - Create 1 Davos (wielding Frostmourne) for (Picked player) at (Position of (Last created unit)) facing Default building facing degrees
-
-
-
Game - Display to (All players) for 60.00 seconds the text: You have 60 seconds...
-
Leaderboard - Show (Last created leaderboard)
-
-
-
Humandeath
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
And - All (Conditions) are true
-
Conditions
-
(Number of living Town Hall units owned by (Owner of (Triggering unit))) Equal to 0
-
(Number of living Peasant units owned by (Owner of (Triggering unit))) Equal to 0
-
(Number of living Davos (wielding Frostmourne) units owned by (Owner of (Triggering unit))) Equal to 0
-
(Unit-type of (Triggering unit)) Not equal to Wight
-
(Unit-type of (Triggering unit)) Not equal to White Walker
-
-
-
-
Actions
-
Unit Group - Pick every unit in (Units in (Playable map area) owned by (Triggering player)) and do (Actions)
-
Loop - Actions
-
Unit - Remove (Picked unit) from the game
-
-
-
Leaderboard - Remove (Triggering player) from (Leaderboard of (Triggering player))
-
Leaderboard - Add (Triggering player) to (Leaderboard of Player 12 (Brown)) with label (Name of (Triggering player)) and value 0
-
Leaderboard - Show (Leaderboard of (Triggering player))
-
Player Group - Remove (Triggering player) from (All players controlled by a User player)
-
Player - Make (Triggering player) treat Player 12 (Brown) as an Ally with shared vision
-
Player - Make Player 12 (Brown) treat (Triggering player) as an Ally with shared vision
-
Player - For Player 12 (Brown), turn Shared units On toward (Triggering player)
-
Player - Make (Triggering player) treat Player 1 (Red) as an Enemy
-
Player - Make (Triggering player) treat Player 2 (Blue) as an Enemy
-
Player - Make (Triggering player) treat Player 3 (Teal) as an Enemy
-
Player - Make (Triggering player) treat Player 4 (Purple) as an Enemy
-
Player - Make (Triggering player) treat Player 5 (Yellow) as an Enemy
-
Player - Make (Triggering player) treat Player 6 (Orange) as an Enemy
-
Player - Make (Triggering player) treat Player 7 (Green) as an Enemy
-
Player - Make (Triggering player) treat Player 8 (Pink) as an Enemy
-
Player - Make (Triggering player) treat Player 9 (Gray) as an Enemy
-
Player - Make (Triggering player) treat Player 10 (Light Blue) as an Enemy
-
Player - Make (Triggering player) treat Player 11 (Dark Green) as an Enemy
-
Wait 0.02 seconds
-
Player Group - Pick every player in (All allies of Player 12 (Brown)) and do (Actions)
-
Loop - Actions
-
Player Group - Make (All allies of Player 12 (Brown)) treat (All allies of Player 12 (Brown)) as an Ally with shared vision
-
-
-
Unit - Create 1 White Walker for (Owner of (Triggering unit)) at (Random point in zombie spawn <gen>) facing Default building facing degrees
-
Trigger - Run Undead Victory <gen> (checking conditions)
-
-