Home   Help Search Login Register  

Author Topic: I require a script which has a group follow a loop of waypoints  (Read 1361 times)

0 Members and 1 Guest are viewing this topic.

SyntropicBob

  • Guest
It would be a patrol and it is circular, also it would be prety neato if they would follow down their patrol until they detect enemy presense and then break off and engage them and then after theyve determined its clear to have them return to their patrol.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
You'll need cycle waypoints and switch triggers.      No time for details now but search the forum and you'll find some good stuff - I've written up how to do this many times, although not recently.
Plenty of reviewed ArmA missions for you to play

Offline Martin Kuka

  • Members
  • *
Recently...place some wps and end it with cycle wp to create a loop.
Then put next wp behind cycle fx hold, defend, patrol or seek and destroy.
Set up a trigger where set:

Activation - west detected by east for example, or vice versa, choose a radius.
Be sure to place wp after the cycle within the radius, otherwise it will take long time to find intruder.
Then synch this trigger with last wp you added.

So when a foe appears and your patrol will detect him, the trigger will go off and they will cancel
patrolling and start searching for him.

This far I have gone in my memories, how to take them back to patrolling I better find somewhere ;D
Lets get rocked

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Martin Kukka is nearly there:

Create a set of waypoints that represents the patrol route.  Make the last waypoint a Cycle Waypoint and place it next to the first waypoint of the patrol.  This will cause the group to move around the patrol route.  In fact once the group reaches the WP before the Cycle WP it then will move to the WP closest to the Cycle WP and so go round the patrol route for ever - unless you do something like I describe below.

After the Cycle WP create another waypoint and make this a Guard waypoint.  It doesn't really matter much where you put this, but just make sure it is not the closest WP to the Cycle WP.  The make the next WP a Move (again it doesn't matter where) and finally put a another Cycle WP next to the start of the patrol (ie near the first Cycle WP you placed).

Create an East detected by West (I presume you are doing it this way round) trigger.  This should be a repeating trigger and should have:
On Activation:  EnemyDetected = true
On Deactivation : EnemyDetected = false

Create a repeating Switch trigger as follows:
Condition: EnemyDetected
Synchronise this with the first Cycle WP you placed

Create another repating Switch trigger as follows:
Condition: not EnemyDetected
Synchronise this with the Move WP before the second Cycle WP you placed
Put Min, Max and Mid to 30

If you are confused by why you need the apparently superfluous Move WP then this is becaue problems can occur if you synchronsie a switch trigger with a Guard WP.

« Last Edit: 13 Aug 2006, 09:30:41 by THobson »

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Apologies for the duplicate post but otherwise you might miss this.  Here try this little missionette.  You are a resistance officer friendly to all - so no one will shoot you if you don't shoot them so you can just watch.

After the enemy is cleared out of the town the patrol will do a couple of patrol loops in Aware mode and then revert to Safe.

EDIT:
The trigger that has the 30 second delay should be changed from a Countdown to a Timeout.  This is to prevent strange behaviour if the enemy leaves the trigger area and then re- enters it within the 30 seconds.
« Last Edit: 15 Aug 2006, 20:04:19 by THobson »