Jump to content
Sign in to follow this  
usarmy19dsniper

Quick Reaction Force ( QRF ) Help

Recommended Posts

Does anybody know of any scripts/methods of adding in an enemy qrf?

Example - AI Infantry squads are patrolling the forest of a 5x5km area. When one of these squads are attacked, a motorized QRF unit from an enemy base rolls out to support the infantry squad.

So basically when Inf. Squad A-Z detects Bluefor, then QRF unit moves to the area around whichever Inf. Squad is/was under contact.

Thanks.

Edited by usarmy19dsniper

Share this post


Link to post
Share on other sites

Give the QRF a HOLD waypoint right next to itself and a Seach and Destroy waypoint near Squad A, then synch the HOLD to a Detected by OPFOR trigger near Squad A.

Share this post


Link to post
Share on other sites

Well the thing is that I want this to be done for multiple squads, so i guess an array would have to be set up. These squads are using the UPS script as well so I have no idea where they will be. Sorry I didn't clarify that.

Share this post


Link to post
Share on other sites

You want one QRF for multiple patrolling squads? Or a generic QRF to respond to any squad?

Share this post


Link to post
Share on other sites

Here's a demo mission for you to check out.

Three OPFOR infantry squads patrolling a 700m x 700m area of woods between Kamenka and Pavlovo. In one of three random spots a BLUFOR patrol will appear. All four squads are patrolling the same area using UPS script. You're a sniper in the QRF so you can see how the waypoints work for that group. Once the mission starts open the map to watch where all the groups are. Speeding the game up helps too. :)

As soon as BLUFOR is Detected by OPFOR the QRF stationed in Kamenka will roll out to the location of contact.

Trigger's onAct:

[QRF_leader, thislist select 0, true, true] call fQRFMove;

QRF_leader is the name of the QRF force's leader unit.

thislist select 0 is the first unit to be detected by our units.

true is a T/F flag. True = Search and Destroy while False = MOVE waypoint type.

true is an optional flag to create a marker on the destination location.

Here's the function it runs:

//////////////////////////////////////////////////////////////////
// Function file for Armed Assault
// Created by: 1ID-CPL. Venori
//////////////////////////////////////////////////////////////////

// init.sqf: fQRFMove = compile (preprocessFileLineNumbers "fQRFMove.sqf");
// trigger: [QRF_leader, thislist select 0, true, true] call fQRFMove;

_qrf = group (_this select 0); // object, QRF leader
_target = _this select 1; // object, detected group leader to move to.
_type = if (_this select 2) then {"SAD"} else {"MOVE"};  // boolean, type of waypoint.  true = SAD, false = MOVE
_marker = if (count _this > 3) then {true} else {false}; // boolean, optional, marker name
_pos = getPos _target;

_wp = _qrf addWaypoint [_pos, 1]; // waypoint at the LZ marker.
[_qrf, 1] setWaypointType _type;  // Set the 1 (second actual waypoint, hence 1 instead of 0) to TRANSPORT UNLOAD.

if (_marker) then {
_qrfMarker = createMarker ["QRFDest", _pos];
 "QRFDest" setMarkerType "waypoint";
};

By the way, 5000x5000 area is basically the entire map. :)

Share this post


Link to post
Share on other sites

That's pretty close to what I want to do. Instead of making another thread, I hope help comes to me with this reply :)

Multiplayer coop mission - A whole island is "occupied". I have two triggers that cover the entire enemy territory. One is blufor detected by civ, and the other is blufor detected by opfor.

When blufor is detected by civ, I need a script to create a fairly large invisible marker centered at the position blufor was detected (for patrol script). Next two independent (friendly to opfor) squads board a transport helo and paradrop over the same position blufor was detected and start patrolling the marker area with the patrol script.

The same scenario when opfor detects blufor except the QRF would be a aggravated attack chopper.

Help with this would be fawesome!

Edited by EvilNate

Share this post


Link to post
Share on other sites
*snip*

using BIS functions makes this really easy.

for vehicles: BIS_fnc_spawnVehicle

for groups: BIS_fnc_spawnGroup

for patrolling: BIS_fnc_taskPatrol

but instead of recreating some code, take alook at my parareinforce script in my sig.

you have every possibilty there, with alot of optionals you can use if needed.

and for the attack heli, you can just use spawnVehicle and use the patrol function on getPos thislist select 0 directly in the trigger on act field..

Edited by Demonized

Share this post


Link to post
Share on other sites

i want to also throw this out there - guard waypoint behaves very much the same way. A squad with a guard waypoint will wait at the waypoint position - when a friendly unit comes under attack, the unit will assess its battle chances of defeating the enemy, if they cannot handle it on their own, the guard squad will be called upon to assist the defending squad. This waypoint becomes even stronger with another unit acting as "sentry" using the sentry waypoint. As the sentry will be considered an observer, and will spot and assess threats, calling in the guard squad to engage if neccessary.

However bear in mind, you have no control over which squads in guard, or how many are actually called upon to assist. It may come as no surprise that 4 squads in guard will all move to engage the enemy.

Share this post


Link to post
Share on other sites
great advice

Your going to make me do some work huh? :)

I wanted to avoid spawning the QRF. Instead I wanted to have the AI at the ready when the mission started. I've done this before with armed assault, but it's been that long since I hit the editor seriously. Thanks for the help :)

Share this post


Link to post
Share on other sites
Your going to make me do some work huh? :)

This is maybe a mood thing for me, but i find it easier, and way better for the OP (you) of the question, to actually try he codes yourself doing some read on what they do and why, getting a understanding on how it works.

Then you can post your codes, not working, with errors or not working as desired, and the community can direct you and suggest improvements, changes, additions etc.

And you will actually understand and learn more from it.

Instead of just giving you a bunch of numbers and letters and symbols wich you put somewhere with little or no clue as to what it does.

And next time you need something you start all over again.

I wanted to avoid spawning the QRF. Instead I wanted to have the AI at the ready when the mission started. I've done this before with armed assault, but it's been that long since I hit the editor seriously. Thanks for the help :)

then guarded wp´s as mentioned is a good possible way:

more indebt info on guard type wp here:

There is also the use of switch triggers, and setWPPos.

For example place your qrf group somewhere, lets say at the base.

place this in the group leader init line:

MyQRFforce1 = group this; QRF_On_standby = true;

That means we made a name for the group MyQRFforce1 wich we can use to acces the group from from anywhere,

And we made a variable telling us its ready waiting at the base for requests, QRF_On_standby.

make 1st wp a HOLD wp at their position, and place this in the wp on act field, this we will use to tell that qrf is on assignments.

QRF_On_standby = false;

make 2nd wp a SAD and place it anywhere on the map.

make 3rd wp a CYCLE wp on top of the HOLD wp, and place this in the wp on act field, this we will use to tell that qrf is not on assignments.

QRF_On_standby = ready;

now in the repeatedly opfor(or others ofc) detected by whoever trigger.

condition:

this AND QRF_On_standby

on act field:

[MyQRFforce1, 2] setWPPos (getPos (thisList select 0));

above means, move the 2 wp (SAD) to the position of the first object in the trigger list, triggerlist is the units wich is detected by someone acording to the trigger.

in specials, dropdown menu of trigger, select switch and press synchronize right side of screen in editor and drag a line from the trigger to the HOLD wp.

what you end up with, is a group standing at base holding, someone spots someone else in your detected triggers, and the force is sent to Search and destroy at the last known position of the detected unit.

after its completed its SAD it will return to the cycle wp, and then start all over on the nearest wp, wich is the hold one.

you can make inventive use of this, making the wps jump between multiple triggers, not being forced to return to base for new assignment etc..

Edited by Demonized

Share this post


Link to post
Share on other sites

Demonized,

Thanks for getting me pointed in the right direction. I was able to get all "QRF" teams working as desired, even in a dedicated MP enviroment. I was also able to populate and patrol all villages/cities in Takistan using the groupSpawn and groupPatrol BIS functions instead of using UPS/UPSMON scripts which reduced the server load all together. Now that I have experience with this, I can hopefuly help others.

I now have exactly what I was looking for with your help. :)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×