Home   Help Search Login Register  

Author Topic: Enemy Resume Patrol  (Read 785 times)

0 Members and 1 Guest are viewing this topic.

Offline Taggart

  • Members
  • *
Enemy Resume Patrol
« on: 28 Sep 2004, 12:29:50 »
I am creating a mission with trip flares in certain locations. When a flare is triggered an AI patrol goes combat and moves to the location using  - russ1 getMarkerPos "Flare1" - This all works very well, but how do I make the AI's go back to patrol if they find nothing after a certain period?  ???  Must I use a hunterkiller script, or can I use another trigger?
Tried in vain got an artery

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Enemy Resume Patrol
« Reply #1 on: 28 Sep 2004, 12:59:34 »
I would suggest that, instead of whatever commands you are using, you use setWPPos and put S&D and cycle waypoints at the relevant location.    Use another switch trigger to get them out of the cycle waypoint whenever you want.
Plenty of reviewed ArmA missions for you to play

Offline ryankaplan

  • Members
  • *
  • yeah...
Re:Enemy Resume Patrol
« Reply #2 on: 28 Sep 2004, 15:54:44 »
how bout something like:

investigate.sqs
_man = this select 0
_flaretrap = this select 1

leader _man lockwp true
leader _man domove _flaretrap
~20
leader _man lockwp false
exit

in the flaretrap trigger, put this in the on activation field:
["billy", "flaretrap1"] exec "investigate.sqs"

billy is the name of one person in the investigating squad.
flaretrap1 is the name of the flaretrap trigger you want him to go to.

this hasn't been tested by me, may or may not work.
if this is confusing i'll explain more.

Offline Taggart

  • Members
  • *
Re:Enemy Resume Patrol
« Reply #3 on: 28 Sep 2004, 21:10:06 »
Thanks macguba and ryankaplan for the quick response. I would rather not utilise a lockwp scenario as this would not be very realistic here. The patrol is covering the area most likely that the west would use for their approach, to make the most of resources though, incase they come in another way, it is covered by the flare. Macguba, I have attached a simple user mission in a zip file, if you have time, can you edit it to what you would propose, using the S&D waypoint and cycle. Thanks in advance.  :)
Tried in vain got an artery

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Enemy Resume Patrol
« Reply #4 on: 28 Sep 2004, 22:58:57 »
Sorry m8,  if I started editing people's missions I'd never see the end of it.    ::)    I get too many requests for individual help as it is.    I'm afraid you'll have to take my suggestions and run with them yourself.

Using lock waypoint for an AI group is not unrealistic.  It's simply using the OFP commands to get the effect you want.   The effect is perfectly realistic, so any commands you use to get it are totally legitimate.


Edit:  which is not to say that somebody else won't have a crack at it for you, I hope they do.
« Last Edit: 28 Sep 2004, 22:59:34 by macguba »
Plenty of reviewed ArmA missions for you to play

Offline Taggart

  • Members
  • *
Re:Enemy Resume Patrol
« Reply #5 on: 29 Sep 2004, 05:35:20 »
LockWp I use quite often, but I don't want a static patrol waiting to be activated. As I said, they are patrolling the area most likely to be infilitrated, and the flare is covering to the side. I understand fully that you don't have time, don't worry I'll manage.  :)
Tried in vain got an artery

Kammak

  • Guest
Re:Enemy Resume Patrol
« Reply #6 on: 01 Oct 2004, 03:21:22 »
Try this approach.

Create a unit, give him one waypoint of type SAD (or move, whichever you want).  In his init field put:

gReact=group this;deleteVehicle this

In your patrol leader's init field, add

gPatrol=group this

Now, when the trip flare goes off, do setWPPos for gReact's waypoint, setting it where the flare went off.

The move everyone from gPatrol group to gReact group, in order, with the leader first.

They'll set off on SAD at the flare point.  Have that trigger spawn a monitor script that checks if they ever find anything.  If they dont, move them back into the group gPatrol.  They'll merrily go back to patrolling on the original patrol waypoints.

You can repeat that as often as needed, setWPPos'ing the gReact SAD waypoint whereever the trip flares go off.