Hello, I am working on a map and finding it difficult to make my "defeat" trigger work. I want players to see a defeat message when everybody's peasent units die (like when all builders die in vampirism or island defence). Here is my trigger;
Defeat
Events
Unit - A unit Dies
Conditions
(Number of units in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Peasant (Staying Alive)))) Equal to 0
Actions
Trigger - Turn off Ghoul Timer <gen>
Trigger - Turn off Abominations Timer <gen>
Trigger - Turn off Knights Timer <gen>
Trigger - Turn off Undead Upgrade <gen>
Trigger - Turn off Necromancers Timer <gen>
Trigger - Turn off Undead King <gen>
Trigger - Turn off Ghouls Spawn <gen>
Trigger - Turn off Abominations Spawn <gen>
Trigger - Turn off Knights Spawn <gen>
Trigger - Turn off Necromancers Spawn <gen>
Trigger - Turn off Undead King <gen>
Trigger - Turn off Victory <gen>
Unit Group - Pick every unit in (Units in (Playable map area) matching ((Owner of (Matching unit)) Not equal to Player 12 (Brown))) and do (Actions)
Loop - Actions
Unit - Kill (Picked unit)
Sound - Stop music Immediately
Game - Display to (All players) for 30.00 seconds the text: Defeat...
Countdown Timer - Pause (Last started timer)
Countdown Timer - Destroy (Last created timer window)
Sound - Play Doom <gen>
When all the peasents die, the trigger does not fire. Does anyone have any ideas why this trigger isn't working?
Defeat
Events
Unit - A unit Dies
Conditions
(Number of units in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Peasant (Staying Alive)))) Equal to 0
Actions
Trigger - Turn off Ghoul Timer <gen>
Trigger - Turn off Abominations Timer <gen>
Trigger - Turn off Knights Timer <gen>
Trigger - Turn off Undead Upgrade <gen>
Trigger - Turn off Necromancers Timer <gen>
Trigger - Turn off Undead King <gen>
Trigger - Turn off Ghouls Spawn <gen>
Trigger - Turn off Abominations Spawn <gen>
Trigger - Turn off Knights Spawn <gen>
Trigger - Turn off Necromancers Spawn <gen>
Trigger - Turn off Undead King <gen>
Trigger - Turn off Victory <gen>
Unit Group - Pick every unit in (Units in (Playable map area) matching ((Owner of (Matching unit)) Not equal to Player 12 (Brown))) and do (Actions)
Loop - Actions
Unit - Kill (Picked unit)
Sound - Stop music Immediately
Game - Display to (All players) for 30.00 seconds the text: Defeat...
Countdown Timer - Pause (Last started timer)
Countdown Timer - Destroy (Last created timer window)
Sound - Play Doom <gen>
When all the peasents die, the trigger does not fire. Does anyone have any ideas why this trigger isn't working?