What is wrong with this trigger?
Code:
Major Forces Self Defense
Events
Unit - A unit Is attacked
Conditions
(((Owner of (Triggering unit)) slot status) Not equal to Is playing) or (((Owner of (Triggering unit)) controller) Not equal to User)
Actions
Player - Make (Owner of (Triggering unit)) treat (Owner of (Attacking unit)) as an Enemy
Player - Make (Owner of (Attacking unit)) treat (Owner of (Triggering unit)) as an Enemy
If ((((Triggering unit) is A structure) Equal to True) and ((Owner of (Triggering unit)) Equal to CitysDefenses)) then do (Unit Group - Pick every unit in CityDefensesUnitGroup and do (Unit - Order (Picked unit) to Attack (Attacking unit))) else do (Do nothing)
If ((((Triggering unit) is A structure) Equal to True) and ((Owner of (Triggering unit)) Equal to Insurgents)) then do (Unit Group - Pick every unit in InsurgentsUnitGroup and do (Unit - Order (Picked unit) to Attack (Attacking unit))) else do (Do nothing)
If ((((Triggering unit) is A structure) Equal to True) and ((Owner of (Triggering unit)) Equal to UndeadScourge)) then do (Unit Group - Pick every unit in UndeadScourgeUnitGroup and do (Unit - Order (Picked unit) to Attack (Attacking unit))) else do (Do nothing)
Trigger - Turn off (This trigger)
Wait 20.00 seconds
Trigger - Turn on (This trigger)