Home   Help Search Login Register  

Author Topic: Patrols  (Read 1600 times)

0 Members and 1 Guest are viewing this topic.

Offline Aldo15

  • OFP-addict
  • Former Staff
  • ****
    • My OFP missions
Patrols
« on: 26 Dec 2010, 17:39:10 »
Hello Again.

I want to know how to make all units of a certain side to see
an enemy unit to travel from "safe" to "Combat"?
My OFP stuff
FMF Project by Aldo15. Coming soon.
If in the high school or university, Teachers add a new subject about how to make scripts, missions, for ofp. I'd be number one of my classroom

Offline RKurtzDmitriyev

  • Former Staff
  • ****
Re: Patrols
« Reply #1 on: 26 Dec 2010, 20:58:34 »
I'm having trouble understanding you, but I think you want this:

1. Make a trigger large enough to cover all needed units. Set activation to "West-Present." In its initialization field, write allunits = thisList.

2. Make another trigger larger enough to cover all needed units. Set activation to "East-Detected by West." In its initialization field, write {_x setBehaviour "COMBAT"} forEach allunits.

When the second trigger is activated, all units in the "list" of the first trigger will now have combat behaviour. Modify the above procedure as needed.

EDIT: clarity
« Last Edit: 27 Dec 2010, 02:35:40 by RKurtzDmitriyev »
The OFP Editing Center wishes to remind you that the faithful COMREF will never threaten to stab you and, in fact, cannot speak.
However, in the event that it does speak, you are encouraged to heed its advice. ;)

Offline Aldo15

  • OFP-addict
  • Former Staff
  • ****
    • My OFP missions
Re: Patrols
« Reply #2 on: 26 Dec 2010, 23:40:00 »
Quote
1. Make a trigger large enough to cover all needed units. Set activation to "West-Present." In its initialization field, write allunits = thisList.

2. Make another trigger larger enough to cover all needed units. Set activation to "East-Detected by West." In its initialization field, write {_x setBehaviour "COMBAT"} forEach allunits.

Thanks for the input, but several vece try and not working. I followed the steps as wrote in the topic but the units still standing.  :no:
My OFP stuff
FMF Project by Aldo15. Coming soon.
If in the high school or university, Teachers add a new subject about how to make scripts, missions, for ofp. I'd be number one of my classroom

Offline RKurtzDmitriyev

  • Former Staff
  • ****
Re: Patrols
« Reply #3 on: 27 Dec 2010, 01:20:38 »
Really? Try the attached demo mission and see what you're doing differently.
The OFP Editing Center wishes to remind you that the faithful COMREF will never threaten to stab you and, in fact, cannot speak.
However, in the event that it does speak, you are encouraged to heed its advice. ;)

Offline Aldo15

  • OFP-addict
  • Former Staff
  • ****
    • My OFP missions
Re: Patrols
« Reply #4 on: 27 Dec 2010, 01:34:58 »
I tried the example you and I have served. That was really what I was looking for.

Thanks RKurtzDmitriyev  :clap: :good:
My OFP stuff
FMF Project by Aldo15. Coming soon.
If in the high school or university, Teachers add a new subject about how to make scripts, missions, for ofp. I'd be number one of my classroom

Offline Lone~Wolf

  • Mission Tools & Mods
  • Members
  • *
  • Vladimir Dmitri Mikhail Andreevich Stamenov
Re: Patrols
« Reply #5 on: 29 Dec 2010, 19:49:11 »
Aldo, I would strongly recommend the tried and tested method of Syncing waypoints with triggers. Always works for me.

Just set some cycling waypoints for a patrol route followed by a "Search and Destroy" waypoint after the Cycle and a move waypoint after the Search and Destroy one. Put the Search and Destroy in the centre of your defended area. Then make a trigger for [ENEMY SIDE] detected by [YOUR SIDE]. Set the activation parameters to be "BaseEnemyDetected = true" and the deactivation parameters to be "BaseEnemyDetected = false".

Then make 2 triggers, the first has the condition "BaseEnemyDetected" and the second "not BaseEnemyDetected". Press F5 (or select synchronisation) and link the first trigger to the cycle waypoint before the Search and Destroy. Then link the second trigger to the Move waypoint after the Search and Destroy.

The trigger for [ENEMY SIDE] detected by [YOUR SIDE] shouldn't be linked to anything.

Set the waypoint parameters of the first patrol waypoint to be "SAFE", and set the parameters for the Search and Destroy waypoint to be "COMBAT" and "ENGAGE AT WILL".

This method will have soldiers patrol around until enemies are spotted. Then the soldiers will spread out around the defended area to fight off the attackers.

If you can't get it working, ask, and I'll provide a demo file.

Hope that helped,
        Lone-Wolf  :cool2:
Snarling creature, lurking in the background, still writing in .sqs