Ok, big problem. For Some reason this trigger will move the the very first time but never again. They are supposed to stay move until all are in their designated region of patrol THEN move. Some reach their destination sooner than others so they need to wait. Here is the code in GUI... (OH and Enemy 1 custom val starts as 1, Enemy 2 custom val starts as 2 ect)
Again this trigger seems to only work for one organized movement then stops working.
Trigger:
- Test5 Patrol
- Events
- Time - Every 0.50 seconds of game time
- Conditions
- And - All (Conditions) are true
- Conditions
- Or - Any (Conditions) are true
- Conditions
- (Regions[1] contains EnemyUnit[1]) Equal to True
- (Regions[2] contains EnemyUnit[1]) Equal to True
- (Regions[3] contains EnemyUnit[1]) Equal to True
- (Regions[4] contains EnemyUnit[1]) Equal to True
- Conditions
- Or - Any (Conditions) are true
- Conditions
- (Regions[1] contains EnemyUnit[2]) Equal to True
- (Regions[2] contains EnemyUnit[2]) Equal to True
- (Regions[3] contains EnemyUnit[2]) Equal to True
- (Regions[4] contains EnemyUnit[2]) Equal to True
- Conditions
- Or - Any (Conditions) are true
- Conditions
- (Regions[1] contains EnemyUnit[3]) Equal to True
- (Regions[2] contains EnemyUnit[3]) Equal to True
- (Regions[3] contains EnemyUnit[3]) Equal to True
- (Regions[4] contains EnemyUnit[3]) Equal to True
- Conditions
- Or - Any (Conditions) are true
- Conditions
- (Regions[1] contains EnemyUnit[4]) Equal to True
- (Regions[2] contains EnemyUnit[4]) Equal to True
- (Regions[3] contains EnemyUnit[4]) Equal to True
- (Regions[4] contains EnemyUnit[4]) Equal to True
- Conditions
- Or - Any (Conditions) are true
- Conditions
- And - All (Conditions) are true
- Actions
- For each (Integer A) from 1 to 4, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Custom value of EnemyUnit[(Integer A)]) Equal to 4
- Then - Actions
- Unit - Set the custom value of EnemyUnit[(Integer A)] to 1
- Set TempPoint = (Center of Regions[((Custom value of EnemyUnit[(Integer A)]) + 0)])
- Unit - Order EnemyUnit[(Integer A)] to Move To TempPoint
- Custom script: call RemoveLocation (udg_TempPoint)
- Else - Actions
- Unit - Set the custom value of EnemyUnit[(Integer A)] to ((Custom value of EnemyUnit[(Integer A)]) + 1)
- Set TempPoint = (Center of Regions[((Custom value of EnemyUnit[(Integer A)]) + 0)])
- Unit - Order EnemyUnit[(Integer A)] to Move To TempPoint
- Custom script: call RemoveLocation (udg_TempPoint)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- For each (Integer A) from 1 to 4, do (Actions)
- Events
Again this trigger seems to only work for one organized movement then stops working.