How to Add static AI? (Guard Base)

Dray Langley

New Member
Ive tried to add them at the editor(2d), but the units became AI player. somehow , i searched about AI.. but there's only patrolling AI, how do i make Static AI that only standing at the base or some buildings.
Thanks before
 
Use SARGE AI Framework.

http://opendayz.net/threads/sarge-ai-framework-public-release.8391/

Install the script to your server, then:

Inside Addons\SARGE\mapconfig\your map

find your the map your running,and open the grps_map file.

All you need is a coordinate of where you want to put static AI, to do this go in game to the exact spot, and check your database\survivor\your UID, and it will say [worldspace] get the grid from there, example: [88,[4283.12,1838.37,0.003]], all you need is [4283.12,1838.37,0.003].

Go to "Defintion of Area Markers for static spawns" on the bottom of the grps_map file, and add something like this:

Code:
// Location
_this = createMarker ["SAR_patrol_locationname", [X, Y, Z]];
_this setMarkerShape "RECTANGLE";
_this setMarkeralpha 0;
_this setMarkerType "Flag";
_this setMarkerBrush "Solid";
_this setMarkerSize [5, 5];
SAR_marker_locationame = _this;

change patrol_locationname to anything you want, for example patrol_road1.
change _marker_locationname to _marker_road1.
change // Location to anything you want, this is just a reference to remember where your location is.
change the X,Y,Z to the coordinates you found, in the example 4283, is X, 1838, is Y, and 0.003 is Z, make sure you use commas correctly.

Now, go to "add here if needed" on the bottom, and place something like this:

Code:
// Location
[SAR_marker_locationname,1,2,4,"fortify",true] call SAR_AI;

Make sure you change _locationname to your location name in the above file, ex, _road1

1,2,4.

the first number is what AI group you want.
(1 = soldiers, 2 = survivors, 3 = bandits)

the second number is the amount of snipers in the group, 2 snipers.
the 3rd number is the amount of rifleman in the group, 4 rifleman.

"fortify",true means that they will defend the area.
"patrol",true means that they will patrol the area, and walk around.
"ambush",true means that they will wait for enemies to approach, and then ambush them.

change this to your liking.

That's all you need for static spawns, use the same code provided, but change the location names to what you want them, Make sure the _patrol_xxx, and _marker_xxx is the same name when adding a new location or it will not work.
 
ehmm guys what i need to do if i want to have some friendlys npcs for example at coast or at the safe zone?, what code or number i need to write for they just stay there (i mean i dont want they shoot anything, just stay there like "afk"), thanks for the help, sorry for my english :D

Maybe i just need to write "patrol",true and nothing more?
 
Back
Top