Home   Help Search Login Register  

Author Topic: Tactical patrolling  (Read 541 times)

0 Members and 1 Guest are viewing this topic.

Mephistopheles

  • Guest
Tactical patrolling
« on: 15 Sep 2004, 14:43:20 »
Hi everyone!

I'm making a mission where an AI group is patrolling at night. I want them to move slowly from one waypoint to the next, and when they arrive at the waypoint, I want them to lie on the ground and cover 360 degrees. I want them to remain like that for about 2 minutes, and then get up and move on to the next waypoint where they will do the same thing. If I set their behaviour to stealth at the waypoint and use the waypoint timer, they crawl rather than walk to the next waypoint. One thing I have tried is to write a script, but I don't know how to set a timer within a script. I think with this approach, I would need to set a variable to 1 once I arrive at the waypoint, and only allow the group to proceed when the variable is set to 0. The script would be called after the variable is set to 1, and the script would change their behaviour to stealth, then wait 60 seconds, then change their behaviour to aware or something like that. Finally, the script would then set the variable to 0. I don't know if I'm thinking about the problem in the right way, so any help would be most appreciated!

Kindest regards,

Mephistopheles

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Tactical patrolling
« Reply #1 on: 15 Sep 2004, 16:56:17 »
Use "double" waypoints.      The first waypoint takes the group to the position.    The second is right next to the first, and has the timer, stealth and so on.    The third is at the next position and puts the group back to aware.    The fourth is right next to the third and so on.

Depending on what behaviour you want you sometimes need more than two waypoints at a position.

A script and variable solution would work, but never use a script when a waypoint will do.

To have a delay in a script you use ~

~60

gives a delay of 60 seconds.

~(random 60)

gives a random delay of between 0 and 60s.
Plenty of reviewed ArmA missions for you to play

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:Tactical patrolling
« Reply #2 on: 15 Sep 2004, 17:11:40 »
u could make a script dat does dat but it might cause a bit of lag. ud hav to use markers as WPs and create a loop using doMove commands.
be a bit compicated... :o
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Tactical patrolling
« Reply #3 on: 15 Sep 2004, 18:10:38 »
If you want them to cover the 360 degrees, then you will need some scripting...
But you can do it with a waypoint, one of the most unused features in OFP, which is the waypoint type 'scripted'...

Here's a thread by Chris Death a long while ago, which explains the usage of such waypoint quite nicely...
http://www.ofpec.com/yabbse/index.php?board=6;action=display;threadid=13884
So no need for looping scripts...

What would be the complicated part is to get the loons to make that full circle, as OFP AI does not go well with moving short distances... I think when moving an AI from point A to point B the distance needs to be somewhere between 5-10 meters (maybe even more...)...
But if a 'biggish' circle is not a problem then a combination of doMove (or commandMove), setDir and  setBehaviour "stealth" (and maybe some maths) is required...

Otherwise, use maccas suggestion, it works fine...

Quote
If I set their behaviour to stealth at the waypoint and use the waypoint timer, they crawl rather than walk to the next waypoint.
This is because you have to change the behaviour in the next waypoint (the next from the stealth waypoint) back to the 'original' the group had before going to stealth...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Mephistopheles

  • Guest
Re:Tactical patrolling
« Reply #4 on: 16 Sep 2004, 02:40:50 »
Hi everyone!

I have tried all of your suggestions, and have achieved good results with each. I do think that macguba's method is cleanest, as you can avoid scripting altogether. My desired, and now obtained, effect is as follows : my 4 man Spetznatz team patrols, and periodically drops to the ground and covers the angles. They lie there for a pre-determined length of time (to ensure they aren't being followed), and eventually get up and keep moving on to the next waypoint. Lol, my SBS team is going to have lots of difficulty hunting them down! Thanks everybody, for all your help!

Kindest regards,

Mephistopheles