Jump to content
Sign in to follow this  
jw custom

Ultra Simple Patrol Script

Recommended Posts

Already did:

I really like this script a lot. Very easy to use and especially if you don't need lots and lots of patrols in cities or towns.

Especially good in wide open spaces.

Share this post


Link to post
Share on other sites

Greetings,

I need to use more than one "patrolmaker" for different areas/zones on the map for different groups patrolling those areas/zones.

I tried the patrolmarker and patrolmarker2 and patrolmarker3 by placing default markers with those names respectively.

So, patrolmarker will have a group with unit init:

nul = [this, 300, "patrolMarker", "patrolMarker", 300, "AWARE", 100, "LIMITED", "FILE",0,0] execVM "USPS.sqf";

and

patrolmarker2 will have a group with unit init:

nul = [this, 500, "patrolMarker2", "patrolMarker2", 500, "AWARE", 100, "LIMITED", "FILE",0,0] execVM "USPS.sqf";

and lastly

patrolmarker3 will have a group with unit init:

nul = [this, 500, "patrolMarker3", "patrolMarker3", 500, "AWARE", 100, "LIMITED", "FILE",0,0] execVM "USPS.sqf";

I'm assuming the USPS.sqf has to be amended for this but I don't have a clue where.

Anybody with any idea?

Share this post


Link to post
Share on other sites

So you have 3 groups which will be patrolling each their own marker area?

If thats what you are asking then yes just do what you did in your post.

In leader of group 1's init put -> nul = [this, 500, 'nameOfMarkerForGroup1ToRandomlySpawnWithin', 'nameOfMarkerForGroup1ToPatrol', 500, 'AWARE', 100, 'LIMITED', 'FILE',0,0] execVM 'USPS.sqf'

In leader of group 2's init put -> nul = [this, 500, 'nameOfMarkerForGroup2ToRandomlySpawnWithin', 'nameOfMarkerForGroup2ToPatrol', 500, 'AWARE', 100, 'LIMITED', 'FILE',0,0] execVM 'USPS.sqf'

In leader of group 3's init put -> nul = [this, 500, 'nameOfMarkerForGroup3ToRandomlySpawnWithin', 'nameOfMarkerForGroup3ToPatrol', 500, 'AWARE', 100, 'LIMITED', 'FILE',0,0] execVM 'USPS.sqf'

Share this post


Link to post
Share on other sites

@JW Custom, Thanks for your reply.

After setting things down correctly, going back in with a player next to the Commander of the patrol for observations/testings, should I see the Commander on the map next to me, yet in 3D world, he is invisible and no other patrol unit?

I'm thinking the other units are patrolling by the time I spawn in after clicking "Preview" in Editor.

The Commander shows up on map but not in the game itself. All is cool with this? That means it's working properly?

Share this post


Link to post
Share on other sites

The parameters:

nul = [this, 500, 'nameOfMarkerForGroup1ToRandomlySpawnWithin', 'nameOfMarkerForGroup1ToPatrol', 500, 'AWARE', 100, 'LIMITED', 'FILE',0,0] execVM 'USPS.sqf'

The 500 (blue) means that the group will be random placed within a 500m radius using the (red) marker name as center. So if you place yourself next to the patrolling group in the editor the chance they will be next to you at mission start is slim.

Share this post


Link to post
Share on other sites

Just set the 500 to zero and the group will start where you placed it in the editor.

Share this post


Link to post
Share on other sites
Just set the 500 to zero and the group will start where you placed it in the editor.

Thanks JW!

Share this post


Link to post
Share on other sites

This script may be easier to use in general. Also, I believe it only uses default AI "behaviour" (correct me if I'm wrong), where as upsmon, the AI are tweaked to act with the environment based on their situation more so than default. In any case, this, DAC or upsmon can make some killer maps :cool:

Share this post


Link to post
Share on other sites

Hi guys i'm making a mission and i would like to use this script, but to help it run better a lot of the enemy units are being spawned in by a diff. script.

-Trigger act.=_h = []execVM "spawnAI.sqf";

-spawnAI.sqf=_group1 = [getMarkerPos"mark1", east,["TK_INS_Soldier_TL_EP1","TK_INS_Soldier_AT_EP1","TK_INS_Soldier_AA_EP1","TK_INS_Bonesetter_EP1","TK_INS_Soldier_MG_EP1","TK_INS_Soldier_EP1","TK_INS_Soldier_EP1","TK_INS_Soldier_EP1","TK_INS_Soldier_EP1","TK_INS_Soldier_EP1","TK_INS_Soldier_EP1"]] call BIS_fnc_spawnGroup;

[_group1] execvm "patrol.sqf";

The spawning script works fine but i cant figure out how to get this patrol script to work with it.

Any help appreciated :)

Share this post


Link to post
Share on other sites

does anyone else have problems with this? so many squads just stand still all bunched up for no reason. weird thing is i can copy exact same units and marker to a blank mission and it will work but it won't work in the original mission..

Share this post


Link to post
Share on other sites

Please do not use this script for now as it does not work!!

I will (for sure this time) update the script very soon, meaning within 1-3 days!

...and yes patrols will search through buildings if told to based on parameters.

*** EDIT ***

I'm sorry i thought i was in the A3 section. The A2 version of USPS most likely wont be updated!

Edited by JW Custom

Share this post


Link to post
Share on other sites

When i place this script on units and load up the mission i get an error before it starts saying "Script USPS.sqf not found" any help?

Share this post


Link to post
Share on other sites
When i place this script on units and load up the mission i get an error before it starts saying "Script USPS.sqf not found" any help?

You haven't placed USPS.sqf into your mission folder. Look at how it's done in the demo mission.

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  

×