1st Upload

Deletes Ai wandering to close to predefined zones
This commit is contained in:
Sp!ts 2016-05-22 23:14:35 -07:00
parent 33ec47c780
commit 3c4cc4ef9e
6 changed files with 100 additions and 0 deletions

23
Readme.md Normal file
View File

@ -0,0 +1,23 @@
Hi There
I would just like to thank the creators of exilez for this code.
To Configure
Open fn_preInit.sqf
define safezone positions (2d coords)
x y r
eg. [[4992.78,8005.07],120],
open safezone.sqf
line 22 - Edit side to match your AI
side
_trigger setTriggerActivation["EAST", "PRESENT", TRUE];
drop the pbo in the @exileserver/addons

BIN
SaferSafezone.pbo Normal file

Binary file not shown.

1
SaferSafezone/$PREFIX$ Normal file
View File

@ -0,0 +1 @@
SaferSafezone

View File

@ -0,0 +1,27 @@
//created by Sp!ts
// Thanks to ExileZ 2.0 by Patrix87 of http:\\multi-jeux.quebec For some of the code//
//Variable declaration
private [
"_position",
"_trigger",
"_nearestLocation",
"_radius"
];
_position = (_this select 0) select 0;
_radius = (_this select 0) select 1;
_nearestLocation = text nearestLocation [_position, ""];
//Create trigger area
_trigger = createTrigger["EmptyDetector", _position];
_trigger setTriggerArea[_radius, _radius, 0, true];
_trigger setTriggerActivation["EAST", "PRESENT", TRUE];
_trigger setTriggerStatements["this && {vehicle _x isKindOf 'Man'} count thislist > 0", "{if (_x isKindOf 'Man') then {_x setdamage 1; deleteVehicle _x;}; }foreach thislist;", ""];
if (Debug) then {
diag_log format["Safer Safezones: Creating Safezone Trigger | Position : %1 | Radius : %2m | Near : %3 ",_position,_radius,_nearestLocation];
};

View File

@ -0,0 +1,23 @@
sleep 1;
diag_log "\\\ --- Starting Sp!ts SaferSafezones ///";
SafeZonePositions =
[// [[Coordinates],Radius] // You can Get the safezone information directly from your mission.sqm under class Markers
[[4992.78,8005.07],120],
[[9120.65,10076.6],120],
[[4357.36,4724.03],120]
];
//compile code
Safezone = compile preprocessFile "SaferSafezone\Code\Safezone.sqf";
//Create Triggers for safezones
{nul = [_x] spawn Safezone;
sleep 0.01;
}foreach SafeZonePositions;
sleep 1;
diag_log "/// --- Sp!ts SaferSafezones Started --- \\\";

26
SaferSafezone/config.cpp Normal file
View File

@ -0,0 +1,26 @@
class CfgPatches
{
class SaferSafezone
{
requiredVersion = 0.1;
requiredAddons[] = {"exile_client","exile_assets","exile_server_config"};
units[] = {};
weapons[] = {};
magazines[] = {};
ammo[] = {};
};
};
class CfgFunctions
{
class SaferSafezone
{
class Bootstrap
{
file = "SaferSafezone\bootstrap";
class preInit
{
preInit = 1;
};
};
};
};