Jump to content
redarmy

Random patrolling in a trigger area?

Recommended Posts

Im trying to create a combat area,it should be within a certain radius,say 400x400.With blufor and opfor(editor placed) multiple groups of each,gradually moving into the area as mission progresses.The effect is that they should/could at some point in time meet via their random waypoints.

Im aware i can create waypoints for a group,then cycle them,and give a random radius,the problem with that is that its elipse/circle shaped and it could lead groups out of the combat area im creating.

Is the any way to create a trigger area 400x400 that groups can patroll and cycle without the placement radius option,and clogging up my editor map with waypoints(as there will be many groups involved.

Thanks in advance for any ideas.

PS; I want to stay clear of mods/(possibly scripts too) as i need to edit alot of groups inits etc

Share this post


Link to post
Share on other sites

I used EOS to spawn multiple groups of blufor and opfor around the town of Pyrgos as we moved in and sure enough their random patrols had them running into each other all over the town creating pockets of fighting here and there.

Share this post


Link to post
Share on other sites
... Is the any way to create a trigger area 400x400 that groups can patroll and cycle without the placement radius option,and clogging up my editor map with waypoints(as there will be many groups involved. ...

BIS_fnc_taskPatrol

somefile.sqf

//place a trigger named sensor1. Size it how you want it.

private ["_grp","_pat"];

_grp = [getPosATL sensor1, West, (configFile >> "CfgGroups" >> "West" >> "Blu_F" >> "infantry" >> "BUS_InfSquad")] call BIS_fnc_spawnGroup; // spawn a group
_pat = [_grp, getPosATL sensor1, triggerArea sensor1 select 0] call bis_fnc_taskPatrol; // Have the group patrol the trigger's area

Edited by Iceman77

Share this post


Link to post
Share on other sites

Thanks for the replys all.

Spirit,i do use MCC but for other purposes,the way iceman described suits my needs.

However looking at the page link you mentioned ice man i got it to work,but not with a trigger area.just the random patroll.

I do not want to spawn a group,just use existing ones.

i used this in init sqf: private ["_grp","_pat"];

_pat = [_grp, getPosATL sensor1, triggerArea sensor1 select 0] call bis_fnc_taskPatrol;

but its not working for me.what am i doing wrong?

Share this post


Link to post
Share on other sites

What ever serves you best mate, but the link is not MCC. It is just the ai intelligence stand alone, so I think can serve your goal.

Share this post


Link to post
Share on other sites
... but its not working for me.what am i doing wrong?

What's the name of your existing group? Have you placed a trigger and gave it a name? ie; sensor1

_pat = [yourGroupNamehere, getPosATL yourTriggerNameHere, triggerArea yourTriggerNameHere select 0] call bis_fnc_taskPatrol;

Share this post


Link to post
Share on other sites
What's the name of your existing group? Have you placed a trigger and gave it a name? ie; sensor1

_pat = [yourGroupNamehere, getPosATL yourTriggerNameHere, triggerArea yourTriggerNameHere select 0] call bis_fnc_taskPatrol;

I did indeed name the group,just pat,as in yr description,placed the trigger with area and gave it name as said above.I was using circle trigger area now that i remember it,possible issue maybe that it wasnt rectangle? Curious to figure it out,however in the meantime i stumbled onto something else to suit my needs.Sono probs but will try and get this working for lessons sake.

@spirit

Yes mate i checked it out briefly.One problem i have with it(gaia/mcc)is that for some reason they have a few minor coflicts with other scripts i run,so i use them as selectivly as possible for certain scenarios,then use other scripts without them,in different scenarios.When i find a script to replace a current script i use that dosent play nicely with gaia/mcc,il take a shot at using it fully and get the most out of it for sure!

stumbled onto UPS,and its simple enough to get the job done and quite a good script also.

Arma 3 is simply the greatest thing since sliced bread,because you guys ;)

Share this post


Link to post
Share on other sites

Place Marker down on the area you want to use. Forget which one. I think its the empty one with purple dotted lines. Name it mkr1.

Then copy & paste this into each group leader' init box: [group this, getPos mkr1, 350] call BIS_fnc_taskPatrol;

They will all work their way into that area casually, and then patrol randomally out to approximately 400 meters or so from mkr1. Quick & Easy! Fun for the whole family!

Share this post


Link to post
Share on other sites
I did indeed name the group,just pat,as in yr description ...

Use your own names. The names I posted are examples. Also the trigger can be any shape. Although it only reads axis a to determine the patrol area. Anyhow, the code I posted works as I tested it prior to posting it.

---------- Post added at 12:02 ---------- Previous post was at 11:56 ----------

Place Marker down on the area you want to use. Forget which one. I think its the empty one with purple dotted lines. Name it mkr1.

Then copy & paste this into each group leader' init box: [group this, getPos mkr1, 350] call BIS_fnc_taskPatrol;

They will all work their way into that area casually, and then patrol randomally out to approximately 400 meters or so from mkr1. Quick & Easy! Fun for the whole family!

I think he wanted trigger size to dictate the patrol's ao.

Share this post


Link to post
Share on other sites
Use your own names. The names I posted are examples. Also the trigger can be any shape. Although it only reads axis a to determine the patrol area. Anyhow, the code I posted works as I tested it prior to posting it.

---------- Post added at 12:02 ---------- Previous post was at 11:56 ----------

I think he wanted trigger size to dictate the patrol's ao.

Thanks iceman,eventually got it working,as you said works great!

Share this post


Link to post
Share on other sites

My apologies for reviving an old thread but I just wanted to say that 4 years later, your post, iceman77, has just helped me figure out an issue and get something working which I am excited about.

 

Thank-you!

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

×