- Joined
- Dec 2, 2016
- Messages
- 733
Basically this trigger is designed to when a unit is attacked, if it's not owned by the triggering unit + the owner of triggering unit is Player(Teal)
It searchs the map, and checks the regions the triggering unit is inside and see's if the regions contain both the unit 'Flag' + Triggering Unit.
I've already tested the trigger, and the conditionals go through but it stops working when it gets to the 'Unit Group - Pick every unit' part.
Am I doing this wrong? I'm trying to search the entire map and find any unit matching 'Flag' and also check if the owner of 'Flag/Picked unit' is the owner of the triggering unit/Unit being attacked and then proceed to do the actions. If never gets past the Unit Group conditions though. Even though a flag exists inside the regions + owned by player(Teal) Any idea? Thanks.
It searchs the map, and checks the regions the triggering unit is inside and see's if the regions contain both the unit 'Flag' + Triggering Unit.
I've already tested the trigger, and the conditionals go through but it stops working when it gets to the 'Unit Group - Pick every unit' part.
Am I doing this wrong? I'm trying to search the entire map and find any unit matching 'Flag' and also check if the owner of 'Flag/Picked unit' is the owner of the triggering unit/Unit being attacked and then proceed to do the actions. If never gets past the Unit Group conditions though. Even though a flag exists inside the regions + owned by player(Teal) Any idea? Thanks.
-
Untitled Trigger 001
-

Events
-


Unit - A unit Is attacked
-
-

Conditions
-

Actions
-


Game - Display to (All players) the text: Start
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(Owner of (Attacking unit)) Not equal to (Owner of (Triggering unit))
-




(Owner of (Triggering unit)) Equal to Player 3 (Teal)
-
-



Then - Actions
-




Game - Display to (All players) the text: YesMain
-




Unit Group - Pick every unit in (Units in (Entire map) matching (((Unit-type of (Picked unit)) Equal to Flag) and ((Owner of (Picked unit)) Equal to (Owner of (Triggering unit))))) and do (Actions)
-





Loop - Actions
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








Or - Any (Conditions) are true
-









Conditions
-










((Base01a <gen> contains (Triggering unit)) Equal to True) and ((Base01a <gen> contains (Picked unit)) Equal to True)
-










((Base01b <gen> contains (Triggering unit)) Equal to True) and ((Base01b <gen> contains (Picked unit)) Equal to True)
-










((Base01c <gen> contains (Triggering unit)) Equal to True) and ((Base01c <gen> contains (Picked unit)) Equal to True)
-
-
-
-







Then - Actions
-








Game - Display to (All players) the text: Yes
-
-







Else - Actions
-








Game - Display to (All players) the text: No
-
-
-
-
-
-



Else - Actions
-
-
-
-
[/code]




