Jump to content
  • 0

How to setup a custom patrol for SARGE AI or DZAI ?


asremix

Question

15 answers to this question

Recommended Posts

  • 0

Answer for DZAI :

 

I'm not sure if you can set up patrols for DZAI, but you can give them  specific locations in an area, and they may patrol inside the radius that you specify. This is the way I do it:

 

server\DZAI\init\world_map_configs\custom_spawns\cust_spawns_chernarus.sqf

 

I put a marker here, this is the location where you will let the AI spawn.

_this = createMarker ["HanEnt1", [6475.04, 14087.7, 0]];
_this setMarkerType "Empty";
_this setMarkerBrush "Solid";
_marker_120 = _this;

 

You have to make sure marker_120 is unique and you have to change "HanEnt1" to your spawnname and edit the coordinates.

 

server\DZAI\init\world_map_configs\custom_markers\cust_markers_chernarus.sqf

 

Then I call upon it, and put a trigger for when the AI has to spawn.

    _this = createTrigger ["EmptyDetector", [6475.04, 14087.7, 0]];
    _this setTriggerArea [600, 600, 0, false];
    _this setTriggerActivation ["ANY", "PRESENT", true];
    _this setTriggerTimeout [10, 15, 20, true];
    _this setTriggerText "HanEnt1";
    _this setTriggerStatements ["{isPlayer _x} count thisList > 0;", "0 = [4,1,20,thisTrigger,['HanEnt1'],2] call fnc_spawnBandits;", "0 = [thisTrigger] spawn fnc_despawnBandits;"];
    _trigger_500 = _this;

EmptyDetector is where you put the coordinates for the "spawn trigger". It puts a 600 meter radius around those coordinates, when a player enters it, the AI spawns. Change setTriggerText "YOURMARKER" and the setTriggerStatements need to be changed as well:

 

[4,1,20,thisTrigger,['HanEnt1'],2]

 

4 = amount of AI

1 = random chance of adding extra AI

20 = patrol radius

HanEnt1 = give the name of the spawn you made

2 = skill level of AI

 

Hope it works, good luck :)

Link to comment
Share on other sites

  • 0

Answer for DZAI :

 

I'm not sure if you can set up patrols for DZAI, but you can give them  specific locations in an area, and they may patrol inside the radius that you specify. This is the way I do it:

 

server\DZAI\init\world_map_configs\custom_spawns\cust_spawns_chernarus.sqf

 

I put a marker here, this is the location where you will let the AI spawn.

_this = createMarker ["HanEnt1", [6475.04, 14087.7, 0]];
_this setMarkerType "Empty";
_this setMarkerBrush "Solid";
_marker_120 = _this;

You have to make sure marker_120 is unique and you have to change "HanEnt1" to your spawnname and edit the coordinates.

 

server\DZAI\init\world_map_configs\custom_markers\cust_markers_chernarus.sqf

 

Then I call upon it, and put a trigger for when the AI has to spawn.

    _this = createTrigger ["EmptyDetector", [6475.04, 14087.7, 0]];
    _this setTriggerArea [600, 600, 0, false];
    _this setTriggerActivation ["ANY", "PRESENT", true];
    _this setTriggerTimeout [10, 15, 20, true];
    _this setTriggerText "HanEnt1";
    _this setTriggerStatements ["{isPlayer _x} count thisList > 0;", "0 = [4,1,20,thisTrigger,['HanEnt1'],2] call fnc_spawnBandits;", "0 = [thisTrigger] spawn fnc_despawnBandits;"];
    _trigger_500 = _this;

EmptyDetector is where you put the coordinates for the "spawn trigger". It puts a 600 meter radius around those coordinates, when a player enters it, the AI spawns. Change setTriggerText "YOURMARKER" and the setTriggerStatements need to be changed as well:

 

[4,1,20,thisTrigger,['HanEnt1'],2]

 

4 = amount of AI

1 = random chance of adding extra AI

20 = patrol radius

HanEnt1 = give the name of the spawn you made

2 = skill level of AI

 

Hope it works, good luck :)

 

I was just wondering... Why are the markers inside the cust_spawns_chernarus.sqf and why are the spawns inside the cust_markers_chernarus.sqf?

Link to comment
Share on other sites

  • 0

Yeah well, it's because it doesn't matter in which file they are to be honest. You could switch them around, think it's me that has switched them around ^^ If you look at your world_chernarus.sqf at the end of the file you see it just loads them both together regardless of content

 

Sorry ^^ but it does work either way

Link to comment
Share on other sites

  • 0

For SARGE AI

addons\SARGE\map_config\SAR_cfg_grps_chernarus.sqf

 

Find this

diag_log format["SAR_AI: Static spawning area definition started"];

 

And make like this

//custom

_this = createMarker ["SAR_patrol_zone_new6", [6710.73,4595.64]]; X,Y
_this setMarkerShape "RECTANGLE";
_this setMarkeralpha 0;
_this setMarkerType "Flag";
_this setMarkerBrush "Solid";
_this setMarkerSize [2, 2];   2,2 size
SAR_patrol_zone_new6 = _this;   zone_new6 this name

 

 

After

Find this

diag_log format["SAR_AI: Static Spawning for infantry patrols started"];

 

make like this

 

//custom
[sAR_patrol_zone_new6,3,6,10,"fortify",true,3600] call SAR_AI;
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...