Patrol Trigger Gone Wrong!

Dannyjayt

New Member
Reaction score
0
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)

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
          • 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
          • 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
          • 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
    • 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)


Again this trigger seems to only work for one organized movement then stops working.
 

Dannyjayt

New Member
Reaction score
0
no one curred :( owell tho i found it out. u need a seperate trigger to run that trigger every time checking conditions.
 

Dimaspy

New Member
Reaction score
19
no one curred :( owell tho i found it out. u need a seperate trigger to run that trigger every time checking conditions.

It's just a lot to take in :)

How would another trigger help? This one runs itself every 0.5 secs, why would it need another trigger?

Even though it might work, you want to know what solves it :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top