mirror of
https://github.com/Teh-Dango/Sarge-AI.git
synced 2024-08-30 16:32:11 +00:00
2..2.1
Sarge AI is now in complete addon format. Please read the new instructions.
This commit is contained in:
parent
397933226a
commit
d14cf56890
BIN
Sarge AI Files/sarge.pbo
Normal file
BIN
Sarge AI Files/sarge.pbo
Normal file
Binary file not shown.
@ -1,79 +0,0 @@
|
||||
/*
|
||||
# Original #
|
||||
Sarge AI System 1.5
|
||||
Created for Arma 2: DayZ Mod
|
||||
Author: Sarge
|
||||
https://github.com/Swiss-Sarge
|
||||
|
||||
# Fork #
|
||||
Sarge AI System 2.0+
|
||||
Modded for Arma 3: Exile Mod
|
||||
Changes: Dango
|
||||
https://www.hod-servers.com
|
||||
|
||||
*/
|
||||
private ["_timeout","_triggername","_tmparr","_markername","_valuearray","_grps_band","_grps_sold","_grps_surv","_trigger"];
|
||||
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
_timeout = SAR_DESPAWN_TIMEOUT;
|
||||
|
||||
_trigger = _this select 1;
|
||||
_triggername = _this select 2;
|
||||
|
||||
_tmparr = toArray (_triggername);
|
||||
|
||||
_tmparr set [4,97];
|
||||
_tmparr set [5,114];
|
||||
_tmparr set [6,101];
|
||||
_tmparr set [7,97];
|
||||
|
||||
_markername = toString _tmparr;
|
||||
|
||||
sleep _timeout;
|
||||
|
||||
if !(triggerActivated _trigger) then {
|
||||
|
||||
if (SAR_DEBUG) then {
|
||||
diag_log format["Sarge's AI System: Despawning groups in: %1", _markername];
|
||||
};
|
||||
|
||||
if (SAR_EXTREME_DEBUG) then {
|
||||
diag_log "SAR EXTREME DEBUG: Content of the Monitor before despawn deletion";
|
||||
call SAR_DEBUG_mon;
|
||||
};
|
||||
|
||||
// get all groups in that area
|
||||
_valuearray = [["grps_band","grps_sold","grps_surv"],_markername] call SAR_AI_mon_read;
|
||||
|
||||
_grps_band = _valuearray select 0;
|
||||
_grps_sold = _valuearray select 1;
|
||||
_grps_surv = _valuearray select 2;
|
||||
|
||||
{
|
||||
{deleteVehicle _x} forEach (units _x);
|
||||
sleep 0.5;
|
||||
deleteGroup _x;
|
||||
} forEach (_grps_band);
|
||||
|
||||
{
|
||||
{deleteVehicle _x} forEach (units _x);
|
||||
sleep 0.5;
|
||||
deleteGroup _x;
|
||||
} forEach (_grps_sold);
|
||||
|
||||
{
|
||||
{deleteVehicle _x} forEach (units _x);
|
||||
sleep 0.5;
|
||||
deleteGroup _x;
|
||||
} forEach (_grps_surv);
|
||||
|
||||
// update SAR_AI_monitor
|
||||
[["grps_band","grps_sold","grps_surv"],[[],[],[]],_markername] call SAR_AI_mon_upd;
|
||||
|
||||
if (SAR_EXTREME_DEBUG) then {
|
||||
diag_log "SAR EXTREME DEBUG: Content of the Monitor after despawn deletion";
|
||||
call SAR_DEBUG_mon;
|
||||
};
|
||||
|
||||
};
|
@ -1,175 +0,0 @@
|
||||
/*
|
||||
# Original #
|
||||
Sarge AI System 1.5
|
||||
Created for Arma 2: DayZ Mod
|
||||
Author: Sarge
|
||||
https://github.com/Swiss-Sarge
|
||||
|
||||
# Fork #
|
||||
Sarge AI System 2.0+
|
||||
Modded for Arma 3: Exile Mod
|
||||
Changes: Dango
|
||||
https://www.hod-servers.com
|
||||
https://github.com/Teh-Dango
|
||||
*/
|
||||
private ["_worldname","_startx","_starty","_gridsize_x","_gridsize_y","_gridwidth","_markername","_triggername","_trig_act_stmnt","_trig_deact_stmnt","_trig_cond","_check","_script_handler","_legendname"];
|
||||
|
||||
if (!isNil "A3XAI_isActive") exitWith {diag_log format ["Sarge's AI System: A3XAI has been detected. Sarge AI is not compatibale with A3XAI. Sarge AI is now exiting!"];};
|
||||
|
||||
if (!isServer && hasInterface) then {
|
||||
"adjustrating" addPublicVariableEventHandler {((_this select 1) select 0) addRating ((_this select 1) select 1);};
|
||||
};
|
||||
|
||||
SAR_AI_hit = compile preprocessFileLineNumbers "sarge\SAR_aihit.sqf";
|
||||
SAR_AI_trace = compile preprocessFileLineNumbers "sarge\SAR_trace_entities.sqf";
|
||||
SAR_AI_base_trace = compile preprocessFileLineNumbers "sarge\SAR_trace_base_entities.sqf";
|
||||
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
call compile preprocessFileLineNumbers "sarge\SAR_config.sqf";
|
||||
|
||||
diag_log format["Sarge's AI System: Starting Sarge AI version %1",SAR_version];
|
||||
|
||||
SAR_AI_killed = compile preprocessFileLineNumbers "sarge\SAR_aikilled.sqf";
|
||||
SAR_AI_VEH_HIT = compile preprocessFileLineNumbers "sarge\SAR_ai_vehicle_hit.sqf";
|
||||
|
||||
SAR_AI_trace_veh = compile preprocessFileLineNumbers "sarge\SAR_trace_from_vehicle.sqf";
|
||||
|
||||
SAR_AI_spawn = compile preprocessFileLineNumbers "sarge\SAR_AI_spawn.sqf";
|
||||
//SAR_AI_Heli_spawn = compile preprocessFileLineNumbers "sarge\SAR_AI_Heli_spawn.sqf";
|
||||
SAR_AI_despawn = compile preprocessFileLineNumbers "sarge\SAR_AI_despawn.sqf";
|
||||
SAR_AI_reammo = compile preprocessFileLineNumbers "sarge\SAR_reammo_refuel_AI.sqf";
|
||||
|
||||
SAR_AI = compile preprocessFileLineNumbers "sarge\SAR_setup_AI_patrol.sqf";
|
||||
SAR_AI_heli = compile preprocessFileLineNumbers "sarge\SAR_setup_AI_patrol_heli.sqf";
|
||||
SAR_AI_land = compile preprocessFileLineNumbers "sarge\SAR_setup_AI_patrol_land.sqf";
|
||||
SAR_AI_GUARDS = compile preprocessFileLineNumbers "sarge\SAR_setup_AI_patrol_guards.sqf";
|
||||
|
||||
call compile preprocessFileLineNumbers "sarge\SAR_functions.sqf";
|
||||
|
||||
publicvariable "SAR_surv_kill_value";
|
||||
publicvariable "SAR_band_kill_value";
|
||||
publicvariable "SAR_DEBUG";
|
||||
publicvariable "SAR_EXTREME_DEBUG";
|
||||
publicvariable "SAR_DETECT_HOSTILE";
|
||||
publicvariable "SAR_DETECT_INTERVAL";
|
||||
publicvariable "SAR_HUMANITY_HOSTILE_LIMIT";
|
||||
|
||||
createCenter EAST;
|
||||
createCenter WEST;
|
||||
|
||||
// unfriendly AI bandits
|
||||
EAST setFriend [EAST, 1];
|
||||
EAST setFriend [CIVILIAN, 1];
|
||||
EAST setFriend [WEST, 0];
|
||||
EAST setFriend [RESISTANCE, 0];
|
||||
|
||||
// Players
|
||||
RESISTANCE setFriend [EAST, 0];
|
||||
RESISTANCE setFriend [WEST, 1];
|
||||
|
||||
// friendly AI
|
||||
WEST setFriend [EAST, 0];
|
||||
WEST setFriend [RESISTANCE, 1];
|
||||
|
||||
// Lets hope this helps with the AI's view of object locality
|
||||
waituntil {(!isNil "PublicServerIsLoaded")};
|
||||
waituntil {(PublicServerIsLoaded)};
|
||||
|
||||
_worldname = toLower worldName;
|
||||
diag_log format["Sarge's AI System: Setting up SAR_AI for %1",_worldname];
|
||||
|
||||
if (SAR_dynamic_spawning) then {
|
||||
|
||||
scopeName "SAR_AI_DYNAI";
|
||||
|
||||
try {
|
||||
if (!(_worldname in SAR_Maps)) then {throw _worldName};
|
||||
call compile preprocessFileLineNumbers (format ["sarge\map_config\SAR_cfg_grid_%1.sqf",_worldname]);
|
||||
} catch {
|
||||
diag_log format ["Sarge's AI System: %1 does not currently support dynamic AI spawning! Dynamic AI spawning has been disabled!",_worldName];
|
||||
breakOut "SAR_AI_DYNAI";
|
||||
};
|
||||
|
||||
diag_log format ["Sarge's AI System: Now generating dynamic map grid for %1.",_worldname];
|
||||
|
||||
// Create grid system and triggers
|
||||
SAR_area_ = text format ["SAR_area_%1","x"];
|
||||
for "_i" from 0 to (_gridsize_y - 1) do
|
||||
{
|
||||
for "_ii" from 0 to (_gridsize_x - 1) do
|
||||
{
|
||||
// Marker Creation
|
||||
_markername = format["SAR_area_%1_%2",_ii,_i];
|
||||
_legendname = format["SAR_area_legend_%1_%2",_ii,_i];
|
||||
|
||||
_this = createMarker[_markername,[_startx + (_ii * _gridwidth * 2),_starty + (_i * _gridwidth * 2)]];
|
||||
if (SAR_EXTREME_DEBUG) then {
|
||||
_this setMarkerAlpha 1;
|
||||
} else {
|
||||
_this setMarkerAlpha 0;
|
||||
};
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkerType "mil_flag";
|
||||
_this setMarkerBrush "BORDER";
|
||||
_this setMarkerSize [_gridwidth, _gridwidth];
|
||||
|
||||
call compile format ["SAR_area_%1_%2 = _this",_ii,_i];
|
||||
|
||||
_this = createMarker[_legendname,[_startx + (_ii * _gridwidth * 2) + (_gridwidth - (_gridwidth/2)),_starty + (_i * _gridwidth * 2) - (_gridwidth - (_gridwidth/10))]];
|
||||
if(SAR_EXTREME_DEBUG) then {
|
||||
_this setMarkerAlpha 1;
|
||||
} else {
|
||||
_this setMarkerAlpha 0;
|
||||
};
|
||||
|
||||
_this setMarkerShape "ICON";
|
||||
_this setMarkerType "mil_flag";
|
||||
_this setMarkerColor "ColorBlack";
|
||||
|
||||
_this setMarkerText format["%1/%2",_ii,_i];
|
||||
_this setMarkerSize [.1, .1];
|
||||
|
||||
// Trigger Statements
|
||||
_triggername = format["SAR_trig_%1_%2",_ii,_i];
|
||||
|
||||
_this = createTrigger ["EmptyDetector", [_startx + (_ii * _gridwidth * 2),_starty + (_i * _gridwidth * 2)]];
|
||||
_this setTriggerArea [_gridwidth, _gridwidth, 0, true];
|
||||
_this setTriggerActivation ["ANY", "PRESENT", true];
|
||||
|
||||
call compile format ["SAR_trig_%1_%2 = _this",_ii,_i];
|
||||
|
||||
_trig_act_stmnt = format["if (SAR_DEBUG) then {diag_log 'SAR DEBUG: trigger on in %1';};[thislist,'%1'] spawn SAR_AI_spawn;",_triggername];
|
||||
_trig_deact_stmnt = format["if (SAR_DEBUG) then {diag_log 'SAR DEBUG: trigger off in %1';};[thislist,thisTrigger,'%1'] spawn SAR_AI_despawn;",_triggername];
|
||||
|
||||
_trig_cond = "{isPlayer _x} count thisList > 0;";
|
||||
|
||||
call compile format ["SAR_trig_%1_%2 ",_ii,_i] setTriggerStatements [_trig_cond,_trig_act_stmnt , _trig_deact_stmnt];
|
||||
|
||||
// standard grid definition - maxgroups (ba,so,su) - probability (ba,so,su) - max group members (ba,so,su)
|
||||
SAR_AI_monitor set[count SAR_AI_monitor, [_markername,[SAR_max_grps_bandits,SAR_max_grps_soldiers,SAR_max_grps_survivors],[SAR_chance_bandits,SAR_chance_soldiers,SAR_chance_survivors],[SAR_max_grpsize_bandits,SAR_max_grpsize_soldiers,SAR_max_grpsize_survivors],[],[],[]]];
|
||||
|
||||
};
|
||||
};
|
||||
diag_log format["Sarge's AI System: The map grid has been established for %1.",worldName];
|
||||
|
||||
["dynamic"] call compile preprocessFileLineNumbers (format ["sarge\map_config\SAR_cfg_grps_%1.sqf",_worldname]);
|
||||
diag_log format["Sarge's AI System: Dynamic spawn definitions have been configured for %1.",worldName];
|
||||
};
|
||||
|
||||
["static"] call compile preprocessFileLineNumbers (format ["sarge\map_config\SAR_cfg_grps_%1.sqf",_worldname]);
|
||||
diag_log format["Sarge's AI System: Static spawn definitions have been configured for %1.",_worldname];
|
||||
|
||||
switch (_worldname) do {
|
||||
case "namalsk": {SAR_Blacklist = ["TraderZoneSebjan","NorthernBoatTrader","SouthernBoatTrader"];};
|
||||
case "altis": {SAR_Blacklist = ["MafiaTraderCity","TraderZoneSilderas","TraderZoneFolia"];};
|
||||
case "tanoa": {SAR_Blacklist = ["ExileMarker1","ExileMarker13","ExileMarker15","ExileMarker35","ExileMarker51"];};
|
||||
default {diag_log format ["Sarge's AI System: ERROR! Blacklisted zones have not been established!",worldName];};
|
||||
};
|
||||
|
||||
diag_log format ["Sarge's AI System: Blacklisted zones have been established for %1",worldName];
|
||||
diag_log format ["Sarge's AI System: Blacklisted zones are %1",SAR_Blacklist];
|
||||
|
||||
if (SAR_Base_Gaurds) then {
|
||||
[] execVM "sarge\SAR_init_Base_guards.sqf";
|
||||
};
|
@ -1,115 +0,0 @@
|
||||
/*
|
||||
# Original #
|
||||
Sarge AI System 1.5
|
||||
Created for Arma 2: DayZ Mod
|
||||
Author: Sarge
|
||||
https://github.com/Swiss-Sarge
|
||||
|
||||
# Fork #
|
||||
Sarge AI System 2.0+
|
||||
Modded for Arma 3: Exile Mod
|
||||
Changes: Dango
|
||||
https://www.hod-servers.com
|
||||
|
||||
*/
|
||||
private ["_snipers","_soldiers","_group","_check","_probability","_chance","_playerlist","_triggername","_tmparr","_markername","_player","_valuearray","_max_grps","_rnd_grps","_max_p_grp","_grps_band","_grps_sold","_grps_surv","_grps_upd","_respawn"];
|
||||
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
_playerlist = _this select 0;
|
||||
_triggername = _this select 1;
|
||||
|
||||
_tmparr = toArray (_triggername);
|
||||
|
||||
_tmparr set[4,97];
|
||||
_tmparr set[5,114];
|
||||
_tmparr set[6,101];
|
||||
_tmparr set[7,97];
|
||||
|
||||
_markername = toString _tmparr;
|
||||
|
||||
{if(isPlayer _x) then {_player = _x;};} foreach _playerlist;
|
||||
|
||||
if (SAR_DEBUG) then {diag_log format["Sarge's AI System: Triggered by: %1", _player];};
|
||||
|
||||
if (SAR_EXTREME_DEBUG) then {
|
||||
diag_log "SAR EXTREME DEBUG: Content of the Monitor before adding spawned groups.";
|
||||
call SAR_DEBUG_mon;
|
||||
};
|
||||
|
||||
if (SAR_dynamic_group_respawn) then {
|
||||
_respawn = true;
|
||||
};
|
||||
|
||||
_valuearray= [["max_grps","rnd_grps","max_p_grp","grps_band","grps_sold","grps_surv"],_markername] call SAR_AI_mon_read;
|
||||
|
||||
_max_grps = _valuearray select 0;
|
||||
_rnd_grps = _valuearray select 1;
|
||||
_max_p_grp = _valuearray select 2;
|
||||
_grps_band = _valuearray select 3;
|
||||
_grps_sold = _valuearray select 4;
|
||||
_grps_surv = _valuearray select 5;
|
||||
_grps_upd = [];
|
||||
|
||||
_grps_upd = _grps_band;
|
||||
|
||||
//for [{_i = (count _grps_band)},{_i < (_max_grps select 0)}, {_i=_i+1}] do
|
||||
for "_i" from (count _grps_band) to ((_max_grps select 0) - 1) do
|
||||
{
|
||||
if(_max_p_grp select 0 > 0) then {
|
||||
_probability = _rnd_grps select 0;
|
||||
_chance = (random 100);
|
||||
if(_chance < _probability) then {
|
||||
_snipers=floor (random ((_max_p_grp select 0)-1));
|
||||
_soldiers =((_max_p_grp select 0)-1) - _snipers;
|
||||
_group = [_markername,3,_snipers,_soldiers,"",_respawn] call SAR_AI;
|
||||
_grps_upd set [count _grps_upd,_group];
|
||||
// update AI monitor
|
||||
_check = [["grps_band"],[_grps_upd],_markername] call SAR_AI_mon_upd;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_grps_upd = _grps_sold;
|
||||
|
||||
//for [{_i = (count _grps_sold)},{_i < (_max_grps select 1)}, {_i=_i+1}] do
|
||||
for "_i" from (count _grps_sold) to ((_max_grps select 1) - 1) do
|
||||
{
|
||||
if(_max_p_grp select 1 > 0) then {
|
||||
_probability = _rnd_grps select 1;
|
||||
_chance = (random 100);
|
||||
if(_chance < _probability) then {
|
||||
_snipers=floor (random ((_max_p_grp select 1)-1));
|
||||
_soldiers =((_max_p_grp select 1)-1) - _snipers;
|
||||
_group = [_markername,1,_snipers,_soldiers,"",_respawn] call SAR_AI;
|
||||
_grps_upd set [count _grps_upd,_group];
|
||||
// update AI monitor
|
||||
_check = [["grps_sold"],[_grps_upd],_markername] call SAR_AI_mon_upd;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_grps_upd = _grps_surv;
|
||||
|
||||
//for [{_i = (count _grps_surv)},{_i < (_max_grps select 2)}, {_i=_i+1}] do
|
||||
for "_i" from (count _grps_surv) to ((_max_grps select 2) - 1) do
|
||||
{
|
||||
if(_max_p_grp select 2 > 0) then {
|
||||
_probability = _rnd_grps select 2;
|
||||
_chance = (random 100);
|
||||
if(_chance < _probability) then {
|
||||
_snipers=floor (random ((_max_p_grp select 2)-1));
|
||||
_soldiers =((_max_p_grp select 2)-1) - _snipers;
|
||||
_group = [_markername,2,_snipers,_soldiers,"",_respawn] call SAR_AI;
|
||||
_grps_upd set [count _grps_upd,_group];
|
||||
// update AI monitor
|
||||
_check = [["grps_surv"],[_grps_upd],_markername] call SAR_AI_mon_upd;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// DEBUG
|
||||
if (SAR_EXTREME_DEBUG) then {
|
||||
diag_log "SAR EXTREME DEBUG: Content of the Monitor after adding spawned groups.";
|
||||
call SAR_DEBUG_mon;
|
||||
};
|
@ -1,99 +0,0 @@
|
||||
/*
|
||||
# Original #
|
||||
Sarge AI System 1.5
|
||||
Created for Arma 2: DayZ Mod
|
||||
Author: Sarge
|
||||
https://github.com/Swiss-Sarge
|
||||
|
||||
# Fork #
|
||||
Sarge AI System 2.0+
|
||||
Modded for Arma 3: Exile Mod
|
||||
Changes: Dango
|
||||
https://www.hod-servers.com
|
||||
|
||||
*/
|
||||
private ["_ai_veh_dmg","_ai_veh","_ai_veh_hitsource","_ai_veh_type","_ai_veh_side","_ai_veh_group_side","_ai_veh_hitsource_group_side","_ai_veh_hitsource_type","_ai_veh_hitsource_name","_ai_veh_hitsource_side","_clientmachine","_player_rating","_shot_veh","_ai_part","_ai_veh_projectile","_message"];
|
||||
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
_ai_veh = _this select 0;
|
||||
_ai_part = _this select 1;
|
||||
_ai_veh_dmg = _this select 2;
|
||||
_ai_veh_hitsource = _this select 3;
|
||||
_ai_veh_projectile = _this select 4;
|
||||
|
||||
_ai_veh_type = typeof _ai_veh;
|
||||
|
||||
|
||||
_ai_veh_side = side _ai_veh;
|
||||
_ai_veh_group_side = side (group _ai_veh);
|
||||
|
||||
_ai_veh_hitsource_type = typeof _ai_veh_hitsource;
|
||||
_ai_veh_hitsource_side = side _ai_veh_hitsource;
|
||||
_ai_veh_hitsource_group_side = side (group _ai_veh_hitsource);
|
||||
|
||||
|
||||
if(isPlayer _ai_veh_hitsource ) then {
|
||||
|
||||
_ai_veh_hitsource_name = name _ai_veh_hitsource;
|
||||
|
||||
if(_ai_veh_projectile iskindof "B_9x18_Ball") then {
|
||||
|
||||
if ((random 100) < 5) then {
|
||||
[nil,_ai_veh_hitsource,rTITLETEXT,"Are you serious? Shooting at a vehicle with a toy? Get a decent weapon ...","PLAIN DOWN",3] call RE;
|
||||
};
|
||||
|
||||
if ((random 100) < 5) then {
|
||||
_message = format["Player %1 throws tincans at vehicles again :-)",_ai_veh_hitsource_name];
|
||||
[nil, nil, rspawn, [[West,"airbase"], _message], { (_this select 0) sideChat (_this select 1) }] call RE;
|
||||
} else {
|
||||
if ((random 100) < 5) then {
|
||||
_message = format["%1, stop tickling my vehicle!",_ai_veh_hitsource_name];
|
||||
[nil, nil, rspawn, [[West,"airbase"], _message], { (_this select 0) sideChat (_this select 1) }] call RE;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
if (SAR_HITKILL_DEBUG && {isServer || !hasInterface}) then {
|
||||
diag_log format["SAR_HITKILL_DEBUG: AI vehicle hit - Type: %1 Side: %2 Group Side: %3 - Part: %4 with ammo: %5 Damage: %6",_ai_veh_type,_ai_veh_side,_ai_veh_group_side,_ai_part,_ai_veh_projectile,_ai_veh_dmg];
|
||||
diag_log format["SAR_HITKILL_DEBUG: AI vehicle attacker - Type: %1 Name: %2 Side: %3 Group Side: %4",_ai_veh_hitsource_type,_ai_veh_hitsource_name, _ai_veh_hitsource_side,_ai_veh_hitsource_group_side];
|
||||
};
|
||||
|
||||
|
||||
if(_ai_veh_group_side == SAR_AI_friendly_side) then { // was it a friendly vehcile ?
|
||||
|
||||
_shot_veh = _ai_veh_hitsource getVariable ["SAR_veh_hit",""];
|
||||
|
||||
if( str(_shot_veh) != str(_ai_veh)) then { // check if the vehicle that was shot was shot the first time
|
||||
|
||||
_ai_veh_hitsource setVariable ["SAR_veh_hit",_ai_veh,true];
|
||||
|
||||
_player_rating = rating _ai_veh_hitsource;
|
||||
|
||||
if((_player_rating > -10000)) then {
|
||||
|
||||
//define global variable
|
||||
adjustrating = [_ai_veh_hitsource,(0 - (10000+_player_rating))];
|
||||
|
||||
// get the players machine ID
|
||||
_clientmachine = owner _ai_veh_hitsource;
|
||||
|
||||
// transmit the global variable to this client machine
|
||||
_clientmachine publicVariableClient "adjustrating";
|
||||
|
||||
if(SAR_HITKILL_DEBUG) then {
|
||||
diag_log format["SAR HITKILL DEBUG: reduced rating (shot a friendly vehicle) for player: %1", _ai_veh_hitsource];
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
(group _ai_veh) reveal [_ai_veh_hitsource,4];
|
||||
|
||||
};
|
||||
|
||||
_ai_veh_dmg;
|
@ -1,115 +0,0 @@
|
||||
/*
|
||||
# Original #
|
||||
Sarge AI System 1.5
|
||||
Created for Arma 2: DayZ Mod
|
||||
Author: Sarge
|
||||
https://github.com/Swiss-Sarge
|
||||
|
||||
# Fork #
|
||||
Sarge AI System 2.0+
|
||||
Modded for Arma 3: Exile Mod
|
||||
Changes: Dango
|
||||
https://www.hod-servers.com
|
||||
|
||||
*/
|
||||
private ["_ai","_aikiller","_aikilled_type","_aikilled_side","_aikilled_group_side","_aikiller_group_side","_aikiller_type","_aikiller_name","_aikiller_side","_respect","_message"];
|
||||
|
||||
_ai = _this select 0;
|
||||
_aikiller = _this select 1;
|
||||
|
||||
_aikilled_type = typeof _ai;
|
||||
_aikilled_side = side _ai;
|
||||
_aikilled_group_side = side (group _ai);
|
||||
|
||||
_aikiller_type = typeof _aikiller;
|
||||
|
||||
if (!(_aikiller_type in SAR_heli_type) && !("LandVehicle" countType [vehicle _aikiller] > 0)) then {
|
||||
_aikiller_name = name _aikiller;
|
||||
} else {
|
||||
_aikiller_name = _aikiller_type;
|
||||
};
|
||||
|
||||
_aikiller_side = side _aikiller;
|
||||
_aikiller_group_side = side (group _aikiller);
|
||||
|
||||
if (SAR_HITKILL_DEBUG) then {
|
||||
diag_log format["SAR_HITKILL_DEBUG: AI hit - %2 - Type: %1 Side: %3 Group Side: %4",_aikilled_type,_ai,_aikilled_side,_aikilled_group_side];
|
||||
diag_log format["SAR_HITKILL_DEBUG: AI attacker - Type: %1 Name: %2 Side: %3 Group Side: %4",_aikiller_type,_aikiller_name, _aikiller_side,_aikiller_group_side];
|
||||
};
|
||||
|
||||
if(isPlayer _aikiller) then {
|
||||
|
||||
if (_aikilled_group_side == SAR_AI_friendly_side) then { // hit a friendly AI
|
||||
|
||||
if (SAR_HITKILL_DEBUG) then {
|
||||
diag_log format["SAR_HITKILL_DEBUG: friendly AI was hit by Player %1",_aikiller];
|
||||
};
|
||||
|
||||
_playerRespect = _aikiller getVariable ["ExileScore", 0];
|
||||
_playerMoney = _aikiller getVariable ["ExileMoney", 0];
|
||||
|
||||
_repChange = SAR_surv_kill_value / 20;
|
||||
|
||||
_playerRespect = _playerRespect - _repChange;
|
||||
_aikiller setVariable ["ExileScore",_playerRespect];
|
||||
|
||||
ExileClientPlayerScore = _playerRespect;
|
||||
(owner _aikiller) publicVariableClient "ExileClientPlayerScore";
|
||||
ExileClientPlayerScore = nil;
|
||||
|
||||
format ["setAccountMoneyAndRespect:%1:%2:%3",_playerMoney ,_playerRespect ,getPlayerUID _aikiller] call ExileServer_system_database_query_fireAndForget;
|
||||
|
||||
if ((random 100) < 3) then {
|
||||
_message = format["Sarge AI: Dammit %1! You are firing on a friendly group check your fire!",_aikiller_name];
|
||||
_message remoteExec ["systemChat",0];
|
||||
} else {
|
||||
if ((random 100) < 3) then {
|
||||
_message = format["Sarge AI: %1, this was the last time you shot one of our team! We are coming for you!",_aikiller_name];
|
||||
_message remoteExec ["systemChat",0];
|
||||
};
|
||||
};
|
||||
|
||||
if (SAR_HITKILL_DEBUG) then {
|
||||
diag_log format["SAR_HITKILL_DEBUG: Adjusting respect for survivor hit by %2 for %1",_aikiller,(SAR_surv_kill_value/10)];
|
||||
};
|
||||
|
||||
if (rating _aikiller > -10000) then { //check if shooter is not already marked as enemy
|
||||
if (SAR_HITKILL_DEBUG) then {
|
||||
diag_log format["SAR_HITKILL_DEBUG: Marking Player %1 as an enemy for a friendly AI hit!",_aikiller];
|
||||
};
|
||||
_aikiller addRating -10000;
|
||||
};
|
||||
|
||||
group _ai reveal _aikiller;
|
||||
|
||||
{
|
||||
_x doTarget _aikiller;
|
||||
_x doFire _aikiller;
|
||||
} foreach units group _ai;
|
||||
};
|
||||
|
||||
if (_aikilled_group_side == SAR_AI_unfriendly_side) then { // hit an unfriendly AI
|
||||
|
||||
if (SAR_HITKILL_DEBUG) then {
|
||||
diag_log format["SAR_HITKILL_DEBUG: unfriendly AI was hit by Player %1",_aikiller];
|
||||
};
|
||||
|
||||
if (SAR_HITKILL_DEBUG) then {
|
||||
diag_log format["SAR_HITKILL_DEBUG: Adjusting respect for bandit hit by %2 for %1",_aikiller,(SAR_band_kill_value/10)];
|
||||
};
|
||||
|
||||
_playerRespect = _aikiller getVariable ["ExileScore", 0];
|
||||
_playerMoney = _aikiller getVariable ["ExileMoney", 0];
|
||||
|
||||
_repChange = SAR_surv_kill_value / 20;
|
||||
|
||||
_playerRespect = _playerRespect + _repChange;
|
||||
_aikiller setVariable ["ExileScore",_playerRespect];
|
||||
|
||||
ExileClientPlayerScore = _playerRespect;
|
||||
(owner _aikiller) publicVariableClient "ExileClientPlayerScore";
|
||||
ExileClientPlayerScore = nil;
|
||||
|
||||
format ["setAccountMoneyAndRespect:%1:%2:%3",_playerMoney ,_playerRespect ,getPlayerUID _aikiller] call ExileServer_system_database_query_fireAndForget;
|
||||
};
|
||||
};
|
@ -1,225 +0,0 @@
|
||||
/*
|
||||
# Original #
|
||||
Sarge AI System 1.5
|
||||
Created for Arma 2: DayZ Mod
|
||||
Author: Sarge
|
||||
https://github.com/Swiss-Sarge
|
||||
|
||||
# Fork #
|
||||
Sarge AI System 2.0+
|
||||
Modded for Arma 3: Exile Mod
|
||||
Changes: Dango
|
||||
https://www.hod-servers.com
|
||||
|
||||
*/
|
||||
private ["_message","_ai","_aikiller","_aikilled_type","_aikilled_side","_aikilled_group_side","_aikiller_group_side","_aikiller_type","_aikiller_name","_aikiller_side","_respect","_humankills","_banditkills","_tmp","_sphere_alpha","_sphere_red","_sphere_green","_sphere_blue","_obj_text_string","_ai_type","_ai_killer_type","_ai_xp_type"];
|
||||
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
_ai = _this select 0;
|
||||
_aikiller = _this select 1;
|
||||
|
||||
_aikilled_type = typeof _ai;
|
||||
_aikilled_side = side _ai;
|
||||
_aikilled_group_side = side (group _ai);
|
||||
|
||||
_aikiller_type = typeof _aikiller;
|
||||
|
||||
if (!(_aikiller_type in SAR_heli_type) && !("LandVehicle" countType [vehicle _aikiller] > 0)) then {
|
||||
_aikiller_name = name _aikiller;
|
||||
} else {
|
||||
_aikiller_name = _aikiller_type;
|
||||
};
|
||||
|
||||
_aikiller_side = side _aikiller;
|
||||
_aikiller_group_side = side (group _aikiller);
|
||||
|
||||
// retrieve AI type from the killed AI
|
||||
_ai_type = _ai getVariable ["SAR_AI_type",""];
|
||||
|
||||
// retrieve AI type from the killer AI
|
||||
_ai_killer_type = _aikiller getVariable ["SAR_AI_type",""];
|
||||
|
||||
// retrieve experience value from the killed AI
|
||||
_ai_xp = _ai getVariable["SAR_AI_experience",0];
|
||||
|
||||
// retrieve experience value from the killing AI
|
||||
_ai_killer_xp = _aikiller getVariable["SAR_AI_experience",0];
|
||||
|
||||
if (_ai_xp < SAR_AI_XP_LVL_2) then {
|
||||
_ai_xp_type = SAR_AI_XP_NAME_1;
|
||||
};
|
||||
if (_ai_xp >= SAR_AI_XP_LVL_2 && _ai_xp < SAR_AI_XP_LVL_3) then {
|
||||
_ai_xp_type = SAR_AI_XP_NAME_2;
|
||||
};
|
||||
if (_ai_xp >= SAR_AI_XP_LVL_3) then {
|
||||
_ai_xp_type = SAR_AI_XP_NAME_3;
|
||||
};
|
||||
|
||||
if (_ai_killer_xp < SAR_AI_XP_LVL_2) then {
|
||||
_ai_killer_xp_type = SAR_AI_XP_NAME_1;
|
||||
};
|
||||
if (_ai_killer_xp >= SAR_AI_XP_LVL_2 && _ai_killer_xp < SAR_AI_XP_LVL_3) then {
|
||||
_ai_killer_xp_type = SAR_AI_XP_NAME_2;
|
||||
};
|
||||
if (_ai_killer_xp >= SAR_AI_XP_LVL_3) then {
|
||||
_ai_killer_xp_type = SAR_AI_XP_NAME_3;
|
||||
};
|
||||
|
||||
diag_log format ["Sarge AI System: _ai_xp = %1; _ai_xp_type = %2",_ai_xp,_ai_xp_type];
|
||||
|
||||
if (SAR_KILL_MSG) then {
|
||||
if (isPlayer _aikiller) then {
|
||||
_message = format["Sarge AI: A %3 %2 was killed by Player: %1",_aikiller_name,_ai_type,_ai_xp_type];
|
||||
_message remoteExec ["systemChat",0];
|
||||
};
|
||||
if (_ai_xp >= SAR_AI_XP_LVL_2) then {
|
||||
_message = format["Sarge AI: A %3 %2 was killed by a %3 %4!",_ai_xp_type,_ai_type,_ai_killer_xp_type,_ai_killer_type];
|
||||
diag_log _message;
|
||||
_message remoteExec ["systemChat",0];
|
||||
};
|
||||
};
|
||||
|
||||
if (SAR_HITKILL_DEBUG) then {
|
||||
diag_log format["SAR_HITKILL_DEBUG: AI killed - Type: %1 Side: %2 Group Side: %3",_aikilled_type, _aikilled_side,_aikilled_group_side];
|
||||
diag_log format["SAR_HITKILL_DEBUG: AI Killer - Type: %1 Name: %2 Side: %3 Group Side: %4",_aikiller_type,_aikiller_name, _aikiller_side,_aikiller_group_side];
|
||||
};
|
||||
|
||||
if (isPlayer _aikiller) then {
|
||||
if (_aikilled_group_side == SAR_AI_friendly_side) then {
|
||||
|
||||
if (SAR_HITKILL_DEBUG) then {
|
||||
diag_log format ["Sarge's AI System: Adjusting respect for survivor or soldier kill by %2 for %1",_aikiller_name,SAR_surv_kill_value];
|
||||
};
|
||||
if (SAR_log_AI_kills) then {
|
||||
_friendlyCount = profileNamespace getVariable["SAR_FRIENDLY_KILLS",0];
|
||||
_aikiller setVariable ["SAR_FRIENDLY_KILLS",(_friendlyCount + 1),true];
|
||||
};
|
||||
|
||||
_playerRespect = _aikiller getVariable ["ExileScore", 0];
|
||||
_playerMoney = _aikiller getVariable ["ExileMoney", 0];
|
||||
|
||||
_repChange = SAR_surv_kill_value / 10;
|
||||
|
||||
_playerRespect = _playerRespect - _repChange;
|
||||
_aikiller setVariable ["ExileScore",_playerRespect];
|
||||
|
||||
_fragType = [[format ["%1 Kill",_ai_type],-_repChange]];
|
||||
[_aikiller, "showFragRequest", [_fragType]] call ExileServer_system_network_send_to;
|
||||
|
||||
ExileClientPlayerScore = _playerRespect;
|
||||
(owner _aikiller) publicVariableClient "ExileClientPlayerScore";
|
||||
ExileClientPlayerScore = nil;
|
||||
|
||||
format ["setAccountMoneyAndRespect:%1:%2:%3",_playerMoney ,_playerRespect ,getPlayerUID _aikiller] call ExileServer_system_database_query_fireAndForget;
|
||||
|
||||
if ((random 100) < 3) then {
|
||||
_message = format["Sarge AI: %1 killed a friendly AI - sending reinforcements!",_aikiller_name];
|
||||
_message remoteExec ["systemChat",0];
|
||||
} else {
|
||||
if ((random 100) < 3) then {
|
||||
_message = format["Sarge AI: Tango down ... we offer a decent reward for the head of %1!",_aikiller_name];
|
||||
_message remoteExec ["systemChat",0];
|
||||
};
|
||||
};
|
||||
};
|
||||
if (_aikilled_group_side == SAR_AI_unfriendly_side) then {
|
||||
|
||||
if (SAR_HITKILL_DEBUG) then {
|
||||
diag_log format ["Sarge's AI System: Adjusting respect for bandit kill by %2 for %1",_aikiller_name,SAR_band_kill_value];
|
||||
};
|
||||
if(SAR_log_AI_kills) then {
|
||||
_hostileCount = profileNamespace getVariable["SAR_HOSTILE_KILLS",0];
|
||||
_aikiller setVariable ["SAR_HOSTILE_KILLS",(_hostileCount + 1),true];
|
||||
};
|
||||
|
||||
_playerRespect = _aikiller getVariable ["ExileScore", 0];
|
||||
_playerMoney = _aikiller getVariable ["ExileMoney", 0];
|
||||
|
||||
_repChange = SAR_surv_kill_value / 10;
|
||||
|
||||
_playerRespect = _playerRespect + _repChange;
|
||||
_aikiller setVariable ["ExileScore",_playerRespect];
|
||||
|
||||
_fragType = [[format ["%1 Kill",_ai_type],_repChange]];
|
||||
[_aikiller, "showFragRequest", [_fragType]] call ExileServer_system_network_send_to;
|
||||
|
||||
ExileClientPlayerScore = _playerRespect;
|
||||
(owner _aikiller) publicVariableClient "ExileClientPlayerScore";
|
||||
ExileClientPlayerScore = nil;
|
||||
|
||||
format ["setAccountMoneyAndRespect:%1:%2:%3",_playerMoney ,_playerRespect ,getPlayerUID _aikiller] call ExileServer_system_database_query_fireAndForget;
|
||||
|
||||
if ((random 100) < 3) then {
|
||||
_message = format["Sarge AI: Nice bandit kill %1!",_aikiller_name];
|
||||
_message remoteExec ["systemChat",0];
|
||||
} else {
|
||||
if ((random 100) < 3) then {
|
||||
_message = format["Sarge AI: Another bandit down ... %1 is going to be the root cause of bandit extinction :]",_aikiller_name];
|
||||
_message remoteExec ["systemChat",0];
|
||||
};
|
||||
};
|
||||
};
|
||||
} else {
|
||||
if(SAR_AI_XP_SYSTEM) then {
|
||||
|
||||
if(!isNull _aikiller) then { // check if AI was killed by an AI, and not driven over / fallen to death etc
|
||||
|
||||
// get xp from the victim
|
||||
_xp_gain = _ai_xp;
|
||||
|
||||
if(_xp_gain == 0) then {
|
||||
_xp_gain=1;
|
||||
};
|
||||
|
||||
// get old xp
|
||||
_ai_killer_xp = _aikiller getVariable ["SAR_AI_experience",0];
|
||||
|
||||
// calculate new xp
|
||||
_ai_killer_xp_new = _ai_killer_xp + _xp_gain;
|
||||
|
||||
if(_ai_killer_xp < SAR_AI_XP_LVL_3) then {
|
||||
|
||||
if(_ai_killer_xp < SAR_AI_XP_LVL_2 && _ai_killer_xp_new >= SAR_AI_XP_LVL_2 ) then { // from level 1 to level 2
|
||||
|
||||
if(SAR_SHOW_XP_LVL) then { diag_log format["Level up from 1 -> 2 for %1",_aikiller];};
|
||||
|
||||
_message = format["Sarge AI: A %1 %2 was promoted!",_ai_killer_xp_type,_ai_killer_type];
|
||||
_message remoteExec ["systemChat",0];
|
||||
|
||||
// restore health to full
|
||||
_aikiller setDamage 0;
|
||||
|
||||
// upgrades for the next level
|
||||
// medium armor
|
||||
_aikiller removeEventHandler ["HandleDamage",0];
|
||||
_aikiller addEventHandler ["HandleDamage",{if (_this select 1!="") then {_unit=_this select 0;damage _unit+((_this select 2)-damage _unit)*SAR_AI_XP_ARMOR_2}}];
|
||||
};
|
||||
|
||||
if(_ai_killer_xp < SAR_AI_XP_LVL_3 && _ai_killer_xp_new >= SAR_AI_XP_LVL_3 ) then { // from level 2 to level 3
|
||||
|
||||
if(SAR_SHOW_XP_LVL) then { diag_log format["Level up from 2 -> 3 for %1",_aikiller];};
|
||||
|
||||
_message = format["Sarge AI: A %1 %2 was promoted!",_ai_killer_xp_type,_ai_killer_type];
|
||||
_message remoteExec ["systemChat",0];
|
||||
|
||||
|
||||
// restore health to full
|
||||
_aikiller setDamage 0;
|
||||
|
||||
// upgrades for the next level
|
||||
// highest armor
|
||||
_aikiller removeEventHandler ["HandleDamage",0];
|
||||
_aikiller addEventHandler ["HandleDamage",{if (_this select 1!="") then {_unit=_this select 0;damage _unit+((_this select 2)-damage _unit)*SAR_AI_XP_ARMOR_3}}];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
//diag_log format["Start XP: %1, End XP: %2",_ai_killer_xp,_ai_killer_xp+_xp_gain];
|
||||
|
||||
// set new xp value for AI that killed the other AI
|
||||
_ai_killer_xp = _ai_killer_xp + _xp_gain;
|
||||
_aikiller setVariable["SAR_AI_experience",_ai_killer_xp];
|
||||
};
|
||||
};
|
||||
};
|
@ -1,288 +0,0 @@
|
||||
/*
|
||||
# Original #
|
||||
Sarge AI System 1.5
|
||||
Created for Arma 2: DayZ Mod
|
||||
Author: Sarge
|
||||
https://github.com/Swiss-Sarge
|
||||
|
||||
# Fork #
|
||||
Sarge AI System 2.0+
|
||||
Modded for Arma 3: Exile Mod
|
||||
Changes: Dango
|
||||
https://www.hod-servers.com
|
||||
|
||||
*/
|
||||
SAR_version = "2.1.7";
|
||||
SAR_HC = true;
|
||||
|
||||
SAR_maps = ["altis","chernarus","taviana","namalsk","lingor3","mbg_celle2","takistan","fallujah","panthera2","tanoa"];
|
||||
|
||||
/* Debug & RPT Settings */
|
||||
SAR_DEBUG = true; // Set to true for RPT info on AI
|
||||
SAR_EXTREME_DEBUG = false; // Set to true for RPT info on damn near everything
|
||||
SAR_HITKILL_DEBUG = true; // Set to true for RPT info on AI shooting and killing
|
||||
SAR_log_AI_kills = true; // Set to true for kill logging by variable. *These variables do not save to the database currently*
|
||||
SAR_KILL_MSG = true; // Set to true for announcing AI kills to the server
|
||||
|
||||
/* Dynamic AI Settings */
|
||||
SAR_dynamic_spawning = true; // Turn dynamic grid spawns on or off
|
||||
SAR_Base_Gaurds = true; // Turn AI territory gurads on or off
|
||||
SAR_dynamic_group_respawn = true; // Turn dynamic grid AI respawn on or off
|
||||
SAR_dynamic_heli_respawn = true; // Turn dynamic grid AI respawn on or off
|
||||
SAR_AI_COMBAT_VEHICLE = false; // Turn the option for AI using vehicles when in combat on or off
|
||||
SAR_AI_STEAL_VEHICLE = false; // Turn the option for AI using vehicles to reach their destination on or off
|
||||
SAR_AI_disable_UPSMON_AI = false; // Turning this off could have unintended consequences
|
||||
SAR_respawn_waittime = 300; // How long to wait before dynamic IA respawns
|
||||
SAR_DESPAWN_TIMEOUT = 120; // How long to wait before despawning dynamic AI
|
||||
SAR_DELETE_TIMEOUT = 300; // How long to wait before deleting dead AI
|
||||
SAR_surv_kill_value = 250; // How much respect players lose if killing friendly AI
|
||||
SAR_band_kill_value = 50; // How much respect players lose if killing hostile AI
|
||||
SAR_RESPECT_HOSTILE_LIMIT = -2500; // Friendly AI will shoot at players with respect below this number
|
||||
SAR_REAMMO_INTERVAL = 30; // How often AI will replenish their ammo count
|
||||
SAR_DETECT_HOSTILE = 200; // How far away AI can detect hostile AI & players
|
||||
SAR_DETECT_INTERVAL = 15; // How often AI can detect AI & players
|
||||
SAR_DETECT_HOSTILE_FROM_VEHICLE = 500; // How far AI can detect hostile AI & players while in a vehicle
|
||||
SAR_DETECT_FROM_VEHICLE_INTERVAL = 5; // How often AI can detect hostile AI & players while in a vehicle
|
||||
|
||||
// Chance the AI will spawn
|
||||
SAR_chance_bandits = 75; // Chance to spawn 1-100%
|
||||
SAR_chance_soldiers = 25; // Chance to spawn 1-100%
|
||||
SAR_chance_survivors = 50; // Chance to spawn 1-100%
|
||||
|
||||
// Max number of AI groups allowed at once
|
||||
SAR_max_grps_bandits = 4; // Total groups per grid
|
||||
SAR_max_grps_soldiers = 2; // Total groups per grid
|
||||
SAR_max_grps_survivors = 2; // Total groups per grid
|
||||
|
||||
// Size of AI groups plus a leader
|
||||
SAR_max_grpsize_bandits = 2; // Size of the group
|
||||
SAR_max_grpsize_soldiers = 2; // Size of the group
|
||||
SAR_max_grpsize_survivors = 2; // Size of the group
|
||||
|
||||
// Chance the AI Helicopters will spawn - IN DEVELOPMENT
|
||||
SAR_chance_band_heli = 35;
|
||||
SAR_chance_surv_heli = 35;
|
||||
SAR_chance_mili_heli = 35;
|
||||
|
||||
// AI experience system
|
||||
SAR_AI_XP_SYSTEM = true; // Turn this feature on or off
|
||||
|
||||
// Level 1 settings
|
||||
SAR_AI_XP_LVL_1 = 0; // xp needed to reach this level
|
||||
SAR_AI_XP_NAME_1 = "Rookie"; // name of the level range
|
||||
SAR_AI_XP_ARMOR_1 = 1; // armor value for this level - values: 0.1 - 1, 1 = no change, 0.5 = damage taken reduced by 50%, 0.1 = damage taken reduced by 90%
|
||||
|
||||
// Level 2 settings
|
||||
SAR_AI_XP_LVL_2 = 5;
|
||||
SAR_AI_XP_NAME_2 = "Veteran";
|
||||
SAR_AI_XP_ARMOR_2 = 0.5;
|
||||
|
||||
// Level 3 settings
|
||||
SAR_AI_XP_LVL_3 = 20;
|
||||
SAR_AI_XP_NAME_3 = "Legendary";
|
||||
SAR_AI_XP_ARMOR_3 = 0.3;
|
||||
|
||||
// Bonus factors for leaders
|
||||
SAR_leader_health_factor = 1; // values: 0.1 - 1, 1 = no change, 0.5 = damage taken reduced by 50%, 0.1 = damage taken reduced by 90% - EXPERIMENTAL
|
||||
|
||||
|
||||
// military AI
|
||||
SAR_leader_sold_skills = [
|
||||
["aimingAccuracy",0.35, 0.10], // skilltype, <min value>, <random value added to min>;
|
||||
["aimingShake", 0.35, 0.10],
|
||||
["aimingSpeed", 0.80, 0.20],
|
||||
["spotDistance", 0.70, 0.30],
|
||||
["spotTime", 0.65, 0.20],
|
||||
["endurance", 0.80, 0.20],
|
||||
["courage", 0.80, 0.20],
|
||||
["reloadSpeed", 0.80, 0.20],
|
||||
["commanding", 0.80, 0.20],
|
||||
["general", 0.80, 0.20]
|
||||
];
|
||||
SAR_soldier_sold_skills = [
|
||||
["aimingAccuracy",0.25, 0.10], // skilltype, <min value>, <random value added to min>;
|
||||
["aimingShake", 0.25, 0.10],
|
||||
["aimingSpeed", 0.70, 0.20],
|
||||
["spotDistance", 0.55, 0.30],
|
||||
["spotTime", 0.30, 0.20],
|
||||
["endurance", 0.60, 0.20],
|
||||
["courage", 0.60, 0.20],
|
||||
["reloadSpeed", 0.60, 0.20],
|
||||
["commanding", 0.60, 0.20],
|
||||
["general", 0.60, 0.20]
|
||||
|
||||
];
|
||||
SAR_sniper_sold_skills = [
|
||||
["aimingAccuracy",0.80, 0.10], // skilltype, <min value>, <random value added to min>;
|
||||
["aimingShake", 0.90, 0.10],
|
||||
["aimingSpeed", 0.70, 0.20],
|
||||
["spotDistance", 0.70, 0.30],
|
||||
["spotTime", 0.75, 0.20],
|
||||
["endurance", 0.70, 0.20],
|
||||
["courage", 0.70, 0.20],
|
||||
["reloadSpeed", 0.70, 0.20],
|
||||
["commanding", 0.70, 0.20],
|
||||
["general", 0.70, 0.20]
|
||||
];
|
||||
|
||||
// bandit AI
|
||||
SAR_leader_band_skills = [
|
||||
["aimingAccuracy",0.35, 0.10], // skilltype, <min value>, <random value added to min>;
|
||||
["aimingShake", 0.35, 0.10],
|
||||
["aimingSpeed", 0.60, 0.20],
|
||||
["spotDistance", 0.40, 0.30],
|
||||
["spotTime", 0.45, 0.20],
|
||||
["endurance", 0.40, 0.20],
|
||||
["courage", 0.50, 0.20],
|
||||
["reloadSpeed", 0.60, 0.20],
|
||||
["commanding", 0.50, 0.20],
|
||||
["general", 0.50, 0.20]
|
||||
];
|
||||
SAR_soldier_band_skills = [
|
||||
["aimingAccuracy",0.15, 0.10], // skilltype, <min value>, <random value added to min>;
|
||||
["aimingShake", 0.15, 0.10],
|
||||
["aimingSpeed", 0.60, 0.20],
|
||||
["spotDistance", 0.40, 0.20],
|
||||
["spotTime", 0.40, 0.20],
|
||||
["endurance", 0.40, 0.20],
|
||||
["courage", 0.40, 0.20],
|
||||
["reloadSpeed", 0.40, 0.20],
|
||||
["commanding", 0.40, 0.20],
|
||||
["general", 0.40, 0.20]
|
||||
];
|
||||
SAR_sniper_band_skills = [
|
||||
["aimingAccuracy",0.70, 0.10], // skilltype, <min value>, <random value added to min>;
|
||||
["aimingShake", 0.80, 0.10],
|
||||
["aimingSpeed", 0.70, 0.20],
|
||||
["spotDistance", 0.90, 0.10],
|
||||
["spotTime", 0.55, 0.20],
|
||||
["endurance", 0.70, 0.20],
|
||||
["courage", 0.70, 0.20],
|
||||
["reloadSpeed", 0.70, 0.20],
|
||||
["commanding", 0.50, 0.20],
|
||||
["general", 0.60, 0.20]
|
||||
];
|
||||
|
||||
// survivor AI
|
||||
SAR_leader_surv_skills = [
|
||||
["aimingAccuracy",0.35, 0.10], // skilltype, <min value>, <random value added to min>;
|
||||
["aimingShake", 0.35, 0.10],
|
||||
["aimingSpeed", 0.60, 0.20],
|
||||
["spotDistance", 0.40, 0.30],
|
||||
["spotTime", 0.45, 0.20],
|
||||
["endurance", 0.40, 0.20],
|
||||
["courage", 0.50, 0.20],
|
||||
["reloadSpeed", 0.60, 0.20],
|
||||
["commanding", 0.50, 0.20],
|
||||
["general", 0.50, 0.20]
|
||||
];
|
||||
SAR_soldier_surv_skills = [
|
||||
["aimingAccuracy",0.15, 0.10], // skilltype, <min value>, <random value added to min>;
|
||||
["aimingShake", 0.15, 0.10],
|
||||
["aimingSpeed", 0.60, 0.20],
|
||||
["spotDistance", 0.45, 0.30],
|
||||
["spotTime", 0.20, 0.20],
|
||||
["endurance", 0.40, 0.20],
|
||||
["courage", 0.40, 0.20],
|
||||
["reloadSpeed", 0.40, 0.20],
|
||||
["commanding", 0.40, 0.20],
|
||||
["general", 0.40, 0.20]
|
||||
];
|
||||
SAR_sniper_surv_skills = [
|
||||
["aimingAccuracy",0.70, 0.10], // skilltype, <min value>, <random value added to min>;
|
||||
["aimingShake", 0.80, 0.10],
|
||||
["aimingSpeed", 0.70, 0.20],
|
||||
["spotDistance", 0.70, 0.30],
|
||||
["spotTime", 0.65, 0.20],
|
||||
["endurance", 0.70, 0.20],
|
||||
["courage", 0.70, 0.20],
|
||||
["reloadSpeed", 0.70, 0.20],
|
||||
["commanding", 0.50, 0.20],
|
||||
["general", 0.60, 0.20]
|
||||
];
|
||||
|
||||
// Military AI ----------------------------------------------------------
|
||||
// ----------------------------------------------------------------------
|
||||
SAR_leader_sold_list = ["B_officer_F"];
|
||||
SAR_sniper_sold_list = ["B_ghillie_lsh_F","B_sniper_F"];
|
||||
SAR_soldier_sold_list = ["B_G_medic_F","B_G_engineer_F","b_soldier_survival_F","B_G_Soldier_TL_F"];
|
||||
|
||||
SAR_sold_leader_weapon_list = ["arifle_Katiba_F","arifle_Mk20_F","arifle_MXC_F","arifle_MX_F","arifle_TRG21_F","arifle_TRG20_F"];
|
||||
SAR_sold_leader_pistol_list = [];
|
||||
|
||||
SAR_sold_leader_items = [["Exile_Item_PlasticBottleFreshWater",75],["Exile_Item_Catfood_Cooked",60],["Exile_Item_InstaDoc",100]];
|
||||
SAR_sold_leader_tools = [["ItemMap",50],["ItemCompass",30],["NVGoggles",5],["ItemRadio",100]];
|
||||
|
||||
SAR_sold_rifleman_weapon_list = ["arifle_Katiba_F","arifle_Mk20_F","arifle_MXC_F","arifle_MX_F","arifle_TRG21_F","arifle_TRG20_F"];
|
||||
SAR_sold_rifleman_pistol_list = [];
|
||||
|
||||
SAR_sold_rifleman_items = [["Exile_Item_PlasticBottleFreshWater",75],["Exile_Item_Catfood_Cooked",60]];
|
||||
SAR_sold_rifleman_tools = [["ItemMap",50],["ItemCompass",30]];
|
||||
|
||||
SAR_sold_sniper_weapon_list = ["srifle_DMR_02_F","arifle_MXM_F","srifle_DMR_04_F"];
|
||||
SAR_sold_sniper_pistol_list = [];
|
||||
|
||||
SAR_sold_sniper_items = [["Exile_Item_PlasticBottleFreshWater",75],["Exile_Item_Catfood_Cooked",60]];
|
||||
SAR_sold_sniper_tools = [["ItemMap",50],["ItemCompass",30]];
|
||||
|
||||
// Survivor AI ----------------------------------------------------------
|
||||
// ---------------------------------------------------------------------
|
||||
SAR_leader_surv_list = ["B_G_Soldier_A_F"];
|
||||
SAR_sniper_surv_list = ["B_G_Soldier_LAT_F"];
|
||||
SAR_soldier_surv_list = ["B_G_Soldier_M_F"];
|
||||
|
||||
SAR_surv_leader_weapon_list = ["arifle_Katiba_F","arifle_Mk20_F","arifle_MXC_F","arifle_MX_F","arifle_TRG21_F","arifle_TRG20_F"];
|
||||
SAR_surv_leader_pistol_list = [];
|
||||
|
||||
SAR_surv_leader_items = [["Exile_Item_PlasticBottleFreshWater",75],["Exile_Item_Catfood_Cooked",60]];
|
||||
SAR_surv_leader_tools = [["ItemMap",50],["ItemCompass",30],["NVGoggles",5],["ItemRadio",100]];
|
||||
|
||||
SAR_surv_rifleman_weapon_list = ["arifle_Katiba_F","arifle_Mk20_F","arifle_MXC_F","arifle_MX_F","arifle_TRG21_F","arifle_TRG20_F"];
|
||||
SAR_surv_rifleman_pistol_list = [];
|
||||
|
||||
SAR_surv_rifleman_items = [["Exile_Item_PlasticBottleFreshWater",75],["Exile_Item_Catfood_Cooked",60]];
|
||||
SAR_surv_rifleman_tools = [["ItemMap",50],["ItemCompass",30]];
|
||||
|
||||
SAR_surv_sniper_weapon_list = ["srifle_DMR_02_F","arifle_MXM_F","srifle_DMR_04_F"];
|
||||
SAR_surv_sniper_pistol_list = [];
|
||||
|
||||
SAR_surv_sniper_items = [["Exile_Item_PlasticBottleFreshWater",75],["Exile_Item_Catfood_Cooked",60]];
|
||||
SAR_surv_sniper_tools = [["ItemMap",50],["ItemCompass",30]];
|
||||
|
||||
// Hostile AI ----------------------------------------------------------
|
||||
// ---------------------------------------------------------------------
|
||||
SAR_leader_band_list = ["O_G_Soldier_lite_F"];
|
||||
SAR_sniper_band_list = ["O_G_Soldier_lite_F"];
|
||||
SAR_soldier_band_list = ["O_G_Soldier_lite_F"];
|
||||
|
||||
SAR_band_leader_weapon_list = ["arifle_Katiba_F","arifle_Mk20_F","arifle_MXC_F","arifle_MX_F","arifle_TRG21_F","arifle_TRG20_F"];
|
||||
SAR_band_leader_pistol_list = [];
|
||||
|
||||
SAR_band_leader_items = [["Exile_Item_PlasticBottleFreshWater",75],["Exile_Item_Catfood_Cooked",60]];
|
||||
SAR_band_leader_tools = [["ItemMap",50],["ItemCompass",30],["NVGoggles",5],["ItemRadio",100]];
|
||||
|
||||
SAR_band_rifleman_weapon_list = ["arifle_Katiba_F","arifle_Mk20_F","arifle_MXC_F","arifle_MX_F","arifle_TRG21_F","arifle_TRG20_F"];
|
||||
SAR_band_rifleman_pistol_list = [];
|
||||
|
||||
SAR_band_rifleman_items = [["Exile_Item_PlasticBottleFreshWater",75],["Exile_Item_Catfood_Cooked",60]];
|
||||
SAR_band_rifleman_tools = [["ItemMap",50],["ItemCompass",30]];
|
||||
|
||||
SAR_band_sniper_weapon_list = ["srifle_DMR_02_F","arifle_MXM_F","srifle_DMR_04_F"];
|
||||
SAR_band_sniper_pistol_list = [];
|
||||
|
||||
SAR_band_sniper_items = [["Exile_Item_PlasticBottleFreshWater",75],["Exile_Item_Catfood_Cooked",60]];
|
||||
SAR_band_sniper_tools = [["ItemMap",50],["ItemCompass",30]];
|
||||
|
||||
|
||||
// Helicopter Types ----------------------------------------------------
|
||||
// ---------------------------------------------------------------------
|
||||
SAR_heli_type = ["B_Heli_Light_01_stripped_F"];
|
||||
|
||||
|
||||
/* -------------------------------- Do Not Edit Below. If you do the AI will not work properly. -------------------------------- */
|
||||
/* -------------------------------- Do Not Edit Below. If you do the AI will not work properly. -------------------------------- */
|
||||
/* -------------------------------- Do Not Edit Below. If you do the AI will not work properly. -------------------------------- */
|
||||
SAR_AI_friendly_side = RESISTANCE;
|
||||
SAR_AI_unfriendly_side = EAST;
|
||||
SAR_AI_monitor = [];
|
||||
SAR_leader_number = 0;
|
@ -1,43 +0,0 @@
|
||||
/*
|
||||
# Original #
|
||||
Sarge AI System 1.5
|
||||
Created for Arma 2: DayZ Mod
|
||||
Author: Sarge
|
||||
https://github.com/Swiss-Sarge
|
||||
|
||||
# Fork #
|
||||
Sarge AI System 2.0+
|
||||
Modded for Arma 3: Exile Mod
|
||||
Changes: Dango
|
||||
https://www.hod-servers.com
|
||||
|
||||
*/
|
||||
class CfgIdentities {
|
||||
class id_SAR {
|
||||
name = "id_SAR";
|
||||
face = "WhiteHead_06";
|
||||
glasses = "None";
|
||||
speaker = "NoVoice";
|
||||
pitch = 1.00;
|
||||
};
|
||||
class id_SAR_band : id_SAR {
|
||||
name = "id_SAR_band";
|
||||
face = "PersianHead_A3_02";
|
||||
};
|
||||
class id_SAR_sold_lead : id_SAR {
|
||||
name = "id_SAR_sold_lead";
|
||||
face = "WhiteHead_02";
|
||||
};
|
||||
class id_SAR_sold_man : id_SAR {
|
||||
name = "id_SAR_sold_man";
|
||||
face = "WhiteHead_02";
|
||||
};
|
||||
class id_SAR_surv_lead : id_SAR {
|
||||
name = "id_SAR_surv_lead";
|
||||
face = "WhiteHead_02";
|
||||
};
|
||||
class id_SAR_surv_man : id_SAR {
|
||||
name = "id_SAR_surv_man";
|
||||
face = "WhiteHead_04";
|
||||
};
|
||||
};
|
@ -1,403 +0,0 @@
|
||||
/*
|
||||
# Original #
|
||||
Sarge AI System 1.5
|
||||
Created for Arma 2: DayZ Mod
|
||||
Author: Sarge
|
||||
https://github.com/Swiss-Sarge
|
||||
|
||||
# Fork #
|
||||
Sarge AI System 2.0pushBack
|
||||
Modded for Arma 3: Exile Mod
|
||||
Changes: Dango
|
||||
https://www.hod-servers.com
|
||||
|
||||
*/
|
||||
|
||||
SAR_circle_static = {
|
||||
//Parameters:
|
||||
//_leader = the leader of the group
|
||||
//_action = the action to execute while forming a circle
|
||||
//_radius = the radius of the circle
|
||||
private ["_center","_defend","_veh","_angle","_dir","_newpos","_forEachIndex","_leader","_action","_grp","_pos","_units","_count","_viewangle","_radius"];
|
||||
|
||||
_count = 0;
|
||||
|
||||
diag_log "SAR_AI: Group should form a circle";
|
||||
|
||||
_leader = _this select 0;
|
||||
_action = _this select 1;
|
||||
_radius = _this select 2;
|
||||
|
||||
_grp = group _leader;
|
||||
_defend = false;
|
||||
_units = units _grp;
|
||||
_count = count _units;
|
||||
|
||||
if(_count > 1) then { // only do this for groups > 1 unit
|
||||
|
||||
_pos = getposASL _leader;
|
||||
_pos = (_leader) modelToWorld[0,0,0];
|
||||
|
||||
doStop _leader;
|
||||
sleep .5;
|
||||
|
||||
//play leader stop animation
|
||||
/* _leader playAction "gestureFreeze";
|
||||
sleep 2; */
|
||||
|
||||
if(_action == "defend") then {
|
||||
_center = _leader;
|
||||
_leader forceSpeed 0;
|
||||
_defend = true;
|
||||
|
||||
_leader disableAI "move";
|
||||
_leader setunitpos "up";
|
||||
_leader disableAI "target";
|
||||
|
||||
_grp enableAttack false;
|
||||
|
||||
//["NOAI"] spawn UPSMON;
|
||||
};
|
||||
|
||||
if(_action == "campfire") then {
|
||||
_veh = createvehicle["Land_Campfire_burning",_pos,[],0,"NONE"];
|
||||
_center = _veh;
|
||||
};
|
||||
|
||||
if(_defend) then {
|
||||
_angle = 360/(_count-1);
|
||||
}else{
|
||||
_angle = 360/(_count);
|
||||
};
|
||||
|
||||
_grp enableGunLights "AUTO";
|
||||
_grp setBehaviour "CARELESS";
|
||||
|
||||
{
|
||||
if(_x != _leader || {_x == _leader && !_defend}) then {
|
||||
|
||||
_newpos = (_center modelToWorld [(sin (_forEachIndex * _angle))*_radius, (cos (_forEachIndex *_angle))*_radius, 0]);
|
||||
|
||||
//diag_log format["Newpos %1: %2",_foreachindex,_newpos];
|
||||
|
||||
if(_defend) then {
|
||||
_dir = 0;
|
||||
}else{
|
||||
_dir = 180;
|
||||
};
|
||||
|
||||
_viewangle = (_foreachIndex * _angle) pushBack _dir;
|
||||
|
||||
[_x,_pos,_newpos,_viewangle,_defend]spawn SAR_move_to_circle_pos;
|
||||
};
|
||||
} foreach _units;
|
||||
//_leader disableAI "MOVE";
|
||||
};
|
||||
};
|
||||
|
||||
SAR_isKindOf_weapon = {
|
||||
// own function because the BiS one does only search vehicle config
|
||||
// parameters:
|
||||
//_weapon = the weapon for which we search the parent class
|
||||
//_class = class to search for
|
||||
//return value: true if found, otherwise false
|
||||
|
||||
private ["_class","_weapon","_cfg_entry","_found","_search_class"];
|
||||
|
||||
_weapon = _this select 0;
|
||||
_class = _this select 1;
|
||||
|
||||
_cfg_entry = configFile >> "CfgWeapons" >> _weapon;
|
||||
_search_class = configFile >> "CfgWeapons" >> _class;
|
||||
|
||||
_found = false;
|
||||
while {isClass _cfg_entry} do
|
||||
{
|
||||
if (_cfg_entry == _search_class) exitWith { _found = true; };
|
||||
|
||||
_cfg_entry = inheritsFrom _cfg_entry;
|
||||
};
|
||||
|
||||
_found;
|
||||
};
|
||||
|
||||
SAR_unit_loadout_tools = {
|
||||
// Parameters:
|
||||
// _unittype (leader, soldier, sniper)
|
||||
// _side (mili, surv, band
|
||||
// return value: tools array
|
||||
|
||||
private ["_unittype","_side","_unit_tools_list","_unit_tools","_tool","_probability","_chance"];
|
||||
|
||||
_unittype = _this select 0;
|
||||
_side = _this select 1;
|
||||
|
||||
_unit_tools_list = call compile format["SAR_%2_%1_tools",_unittype,_side];
|
||||
|
||||
_unit_tools = [];
|
||||
{
|
||||
_tool = _x select 0;
|
||||
_probability = _x select 1;
|
||||
_chance = (random 100);
|
||||
if(_chance < _probability) then {
|
||||
_unit_tools set [count _unit_tools, _tool];
|
||||
};
|
||||
} foreach _unit_tools_list;
|
||||
|
||||
_unit_tools;
|
||||
};
|
||||
|
||||
SAR_unit_loadout_items = {
|
||||
// Parameters:
|
||||
// _unittype (leader, soldier, sniper)
|
||||
// _side (mili, surv, band)
|
||||
// return value: items array
|
||||
|
||||
private ["_unittype","_unit_items_list","_unit_items","_item","_probability","_chance","_side"];
|
||||
|
||||
_unittype = _this select 0;
|
||||
_side = _this select 1;
|
||||
|
||||
_unit_items_list = call compile format["SAR_%2_%1_items",_unittype,_side];
|
||||
|
||||
_unit_items = [];
|
||||
{
|
||||
_item = _x select 0;
|
||||
_probability = _x select 1;
|
||||
_chance = (random 100);
|
||||
if(_chance < _probability) then {
|
||||
_unit_items set [count _unit_items, _item];
|
||||
};
|
||||
} foreach _unit_items_list;
|
||||
|
||||
_unit_items;
|
||||
};
|
||||
|
||||
SAR_unit_loadout_weapons = {
|
||||
// Parameters:
|
||||
// _unittype (leader, rifleman, sniper)
|
||||
// _side (sold,surv,band)
|
||||
// return value: weapons array
|
||||
|
||||
private ["_unittype","_side","_unit_weapon_list","_unit_pistol_list","_unit_pistol_name","_unit_weapon_name","_unit_weapon_names"];
|
||||
|
||||
_unittype = _this select 0;
|
||||
_side = _this select 1;
|
||||
|
||||
_unit_weapon_list = call compile format["SAR_%2_%1_weapon_list",_unittype,_side];
|
||||
_unit_pistol_list = call compile format["SAR_%2_%1_pistol_list",_unittype,_side];
|
||||
|
||||
_unit_weapon_names = [];
|
||||
_unit_weapon_name = "";
|
||||
_unit_pistol_name = "";
|
||||
|
||||
if(count _unit_weapon_list > 0) then {
|
||||
_unit_weapon_name = _unit_weapon_list select (floor(random (count _unit_weapon_list)));
|
||||
};
|
||||
if(count _unit_pistol_list > 0) then {
|
||||
_unit_pistol_name = _unit_pistol_list select (floor(random (count _unit_pistol_list)));
|
||||
};
|
||||
_unit_weapon_names set [0, _unit_weapon_name];
|
||||
_unit_weapon_names set [1, _unit_pistol_name];
|
||||
|
||||
_unit_weapon_names;
|
||||
};
|
||||
|
||||
SAR_unit_loadout = {
|
||||
// Parameters:
|
||||
// _unit (Unit to apply the loadout to)
|
||||
// _weapons (array with weapons for the loadout)
|
||||
// _items (array with items for the loadout)
|
||||
// _tools (array with tools for the loadout)
|
||||
|
||||
private ["_unit","_weapons","_weapon","_items","_unit_magazine_name","_item","_tool","_tools","_forEachIndex"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_weapons = _this select 1;
|
||||
_items = _this select 2;
|
||||
_tools = _this select 3;
|
||||
|
||||
removeAllWeapons _unit;
|
||||
removeAllItems _unit;
|
||||
removeAllAssignedItems _unit;
|
||||
removeGoggles _unit;
|
||||
|
||||
_unit enableFatigue false;
|
||||
|
||||
{
|
||||
_weapon = _weapons select _forEachIndex;
|
||||
|
||||
if (_weapon !="") then
|
||||
{
|
||||
_unit_magazine_name = getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines") select 0;
|
||||
_unit addMagazine _unit_magazine_name;
|
||||
_unit addWeapon _weapon;
|
||||
};
|
||||
} foreach _weapons;
|
||||
|
||||
{
|
||||
_item = _items select _forEachIndex;
|
||||
_unit addMagazine _item;
|
||||
} foreach _items;
|
||||
|
||||
{
|
||||
_tool = _tools select _forEachIndex;
|
||||
_unit addWeapon _tool;
|
||||
} foreach _tools;
|
||||
};
|
||||
|
||||
SAR_AI_mon_upd = {
|
||||
// Parameters:
|
||||
// _typearray (possible values = "max_grps", "rnd_grps", "max_p_grp", "grps_band","grps_sold","grps_surv")
|
||||
// _valuearray (must be an array)
|
||||
// _gridname (is the areaname of the grid for this change)
|
||||
|
||||
private ["_typearray","_valuearray","_gridname","_path","_success","_forEachIndex"];
|
||||
|
||||
_typearray = _this select 0;
|
||||
_valuearray =_this select 1;
|
||||
_gridname = _this select 2;
|
||||
|
||||
_path = [SAR_AI_monitor, _gridname] call BIS_fnc_findNestedElement;
|
||||
|
||||
{
|
||||
switch (_x) do
|
||||
{
|
||||
case "max_grps":
|
||||
{
|
||||
_path set [1,1];
|
||||
};
|
||||
case "rnd_grps":
|
||||
{
|
||||
_path set [1,2];
|
||||
};
|
||||
case "max_p_grp":
|
||||
{
|
||||
_path set [1,3];
|
||||
};
|
||||
case "grps_band":
|
||||
{
|
||||
_path set [1,4];
|
||||
};
|
||||
case "grps_sold":
|
||||
{
|
||||
_path set [1,5];
|
||||
};
|
||||
case "grps_surv":
|
||||
{
|
||||
_path set [1,6];
|
||||
};
|
||||
};
|
||||
|
||||
_success = [SAR_AI_monitor, _path, _valuearray select _forEachIndex] call BIS_fnc_setNestedElement;
|
||||
|
||||
} foreach _typearray;
|
||||
|
||||
_success;
|
||||
};
|
||||
|
||||
SAR_AI_mon_read = {
|
||||
// Parameters:
|
||||
// _typearray (possible values = "max_grps", "rnd_grps", "max_p_grp", "grps_band","grps_sold","grps_surv")
|
||||
// _gridname (is the areaname of the grid for this change)
|
||||
|
||||
private ["_typearray","_gridname","_path","_resultarray"];
|
||||
|
||||
_typearray = _this select 0;
|
||||
_gridname = _this select 1;
|
||||
_resultarray = [];
|
||||
|
||||
_path = [SAR_AI_monitor, _gridname] call BIS_fnc_findNestedElement;
|
||||
|
||||
{
|
||||
switch (_x) do
|
||||
{
|
||||
case "max_grps":
|
||||
{
|
||||
_path set [1,1];
|
||||
};
|
||||
case "rnd_grps":
|
||||
{
|
||||
_path set [1,2];
|
||||
};
|
||||
case "max_p_grp":
|
||||
{
|
||||
_path set [1,3];
|
||||
};
|
||||
case "grps_band":
|
||||
{
|
||||
_path set [1,4];
|
||||
};
|
||||
case "grps_sold":
|
||||
{
|
||||
_path set [1,5];
|
||||
};
|
||||
case "grps_surv":
|
||||
{
|
||||
_path set [1,6];
|
||||
};
|
||||
};
|
||||
_resultarray set [count _resultarray,[SAR_AI_monitor, _path] call BIS_fnc_returnNestedElement];
|
||||
} foreach _typearray;
|
||||
|
||||
_resultarray;
|
||||
};
|
||||
|
||||
SAR_DEBUG_mon = {
|
||||
diag_log "--------------------Start of AI monitor values -------------------------";
|
||||
{
|
||||
diag_log format["SAR EXTREME DEBUG: %1",_x];
|
||||
}foreach SAR_AI_monitor;
|
||||
|
||||
diag_log "--------------------End of AI monitor values -------------------------";
|
||||
};
|
||||
|
||||
|
||||
SAR_fnc_returnConfigEntry = {
|
||||
private ["_config", "_entryName","_entry", "_value"];
|
||||
|
||||
_config = _this select 0;
|
||||
_entryName = _this select 1;
|
||||
_entry = _config >> _entryName;
|
||||
|
||||
//If the entry is not found and we are not yet at the config root, explore the class' parent.
|
||||
if (((configName (_config >> _entryName)) == "") && {!((configName _config) in ["CfgVehicles", "CfgWeapons", ""])}) then {
|
||||
[inheritsFrom _config, _entryName] call SAR_fnc_returnConfigEntry;
|
||||
}
|
||||
else { if (isNumber _entry) then { _value = getNumber _entry; } else { if (isText _entry) then { _value = getText _entry; }; }; };
|
||||
//Make sure returning 'nil' works.
|
||||
if (isNil "_value") exitWith {nil};
|
||||
|
||||
_value;
|
||||
};
|
||||
|
||||
// *WARNING* BIS FUNCTION RIPOFF - Taken from fn_fnc_returnVehicleTurrets and shortened a bit
|
||||
SAR_fnc_returnVehicleTurrets = {
|
||||
private ["_entry","_turrets","_turretIndex"];
|
||||
|
||||
_entry = _this select 0;
|
||||
_turrets = [];
|
||||
_turretIndex = 0;
|
||||
|
||||
//Explore all turrets and sub-turrets recursively.
|
||||
for "_i" from 0 to ((count _entry) - 1) do {
|
||||
private ["_subEntry"];
|
||||
_subEntry = _entry select _i;
|
||||
if (isClass _subEntry) then {
|
||||
private ["_hasGunner"];
|
||||
_hasGunner = [_subEntry, "hasGunner"] call SAR_fnc_returnConfigEntry;
|
||||
//Make sure the entry was found.
|
||||
if (!(isNil "_hasGunner")) then {
|
||||
if (_hasGunner == 1) then {
|
||||
_turrets = _turrets pushBack [_turretIndex];
|
||||
//Include sub-turrets, if present.
|
||||
if (isClass (_subEntry >> "Turrets")) then { _turrets = _turrets pushBack [[_subEntry >> "Turrets"] call SAR_fnc_returnVehicleTurrets]; }
|
||||
else { _turrets = _turrets pushBack [[]]; };
|
||||
};
|
||||
};
|
||||
_turretIndex = _turretIndex + 1;
|
||||
};
|
||||
sleep 0.01;
|
||||
};
|
||||
_turrets;
|
||||
};
|
@ -1,68 +0,0 @@
|
||||
/*
|
||||
# Original #
|
||||
Sarge AI System 1.5
|
||||
Created for Arma 2: DayZ Mod
|
||||
Author: Sarge
|
||||
https://github.com/Swiss-Sarge
|
||||
|
||||
# Fork #
|
||||
Sarge AI System 2.0+
|
||||
Modded for Arma 3: Exile Mod
|
||||
Changes: Dango
|
||||
https://www.hod-servers.com
|
||||
|
||||
*/
|
||||
private["_sizeX","_sizeY","_snipers","_rifleMen","_sizeOfBase","_marker","_markername","_tMark","_flagPoles","_baseLevel","_baseName"];
|
||||
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
_flagPoles = nearestObjects [getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition"), ["Exile_Construction_Flag_Static"], 25000];
|
||||
|
||||
diag_log "Sarge AI System: Territory Base Gaurds Are Now Initializing";
|
||||
|
||||
diag_log format["Sarge AI System: Total Territory Locations Query Returned With: %1",(count _flagPoles)];
|
||||
|
||||
{
|
||||
_baseName = _x getVariable ["ExileTerritoryName",""];
|
||||
_sizeOfBase = _x getVariable ["ExileTerritorySize",""];
|
||||
|
||||
_padding = 5;
|
||||
_spawnRadius = _sizeOfBase + _padding;
|
||||
|
||||
switch (_sizeOfBase) do {
|
||||
case default {_rifleMen = 1; _snipers = 0; _sizeX = _spawnRadius; _sizeY = _spawnRadius;};
|
||||
case 15: {_rifleMen = 1; _snipers = 0; _sizeX = _spawnRadius; _sizeY = _spawnRadius;};
|
||||
case 30: {_rifleMen = 1; _snipers = 0; _sizeX = _spawnRadius; _sizeY = _spawnRadius;};
|
||||
case 45: {_rifleMen = 2; _snipers = 0; _sizeX = _spawnRadius; _sizeY = _spawnRadius;};
|
||||
case 60: {_rifleMen = 2; _snipers = 0; _sizeX = _spawnRadius; _sizeY = _spawnRadius;};
|
||||
case 75: {_rifleMen = 1; _snipers = 1; _sizeX = _spawnRadius; _sizeY = _spawnRadius;};
|
||||
case 90: {_rifleMen = 1; _snipers = 1; _sizeX = _spawnRadius; _sizeY = _spawnRadius;};
|
||||
case 105: {_rifleMen = 2; _snipers = 1; _sizeX = _spawnRadius; _sizeY = _spawnRadius;};
|
||||
case 120: {_rifleMen = 2; _snipers = 1; _sizeX = _spawnRadius; _sizeY = _spawnRadius;};
|
||||
case 135: {_rifleMen = 2; _snipers = 2; _sizeX = _spawnRadius; _sizeY = _spawnRadius;};
|
||||
case 150: {_rifleMen = 2; _snipers = 2; _sizeX = _spawnRadius; _sizeY = _spawnRadius;};
|
||||
};
|
||||
sleep 1;
|
||||
|
||||
if (SAR_debug) then {
|
||||
diag_log format ["Sarge AI System: Now Processing Territory %1 at Location %2 with a size of %3.",_baseName,(getPosATL _x),_sizeOfBase];
|
||||
};
|
||||
|
||||
_baseMarker = format["Gaurd_Marker_%1",_baseName];
|
||||
_spawnMark = createMarkerLocal [_baseMarker,(getPosATL _x)];
|
||||
_spawnMark setMarkerShape "ELLIPSE";
|
||||
_spawnMark setMarkerType "Flag";
|
||||
_spawnMark setMarkerBrush "Solid";
|
||||
_spawnMark setMarkerSize [_sizeX,_sizeY];
|
||||
_spawnMark setMarkeralpha 0;
|
||||
|
||||
_behaviors = ["patrol"]; // Do not change this!
|
||||
_behavior = _behaviors call BIS_fnc_selectRandom;
|
||||
|
||||
[_x,_spawnMark,2,_snipers,_rifleMen,_behavior,false,5200] call SAR_AI_GUARDS;
|
||||
|
||||
s_player_guardToggle = _x addaction [format[("<t color=""#FFFFFF"">" + ("Toggle Guards to Kill all non-base owners") +"</t>"),""],"dayz_code\actions\toggle_base_guards.sqf",_x,1,false,true,"",""];
|
||||
|
||||
} foreach _flagPoles;
|
||||
|
||||
diag_log "Sarge AI System: Territory base gaurds have now completed spawning.";
|
@ -1,74 +0,0 @@
|
||||
/*
|
||||
# Original #
|
||||
Sarge AI System 1.5
|
||||
Created for Arma 2: DayZ Mod
|
||||
Author: Sarge
|
||||
https://github.com/Swiss-Sarge
|
||||
|
||||
# Fork #
|
||||
Sarge AI System 2.0+
|
||||
Modded for Arma 3: Exile Mod
|
||||
Changes: Dango
|
||||
https://www.hod-servers.com
|
||||
|
||||
*/
|
||||
private ["_targetAI","_actingPlayer","_animState","_started","_finished","_isMedic","_leadername"];
|
||||
|
||||
|
||||
//if (isServer) exitWith {}; // only run this on the client
|
||||
//if (!hasInterface) exitWith {}; // only run this on the client
|
||||
|
||||
_targetAI = _this select 0;
|
||||
_actingPlayer = _this select 1;
|
||||
/*
|
||||
_leadername = _targetAI getVariable ["SAR_leader_name",false];
|
||||
|
||||
// suspend UPSMON
|
||||
call compile format ["KRON_UPS_%1=2",_leadername];
|
||||
|
||||
publicVariable format["KRON_UPS_%1",_leadername];
|
||||
sleep 5;
|
||||
*/
|
||||
|
||||
diag_log ["Sarge AI System: Sarge Interact feature activated!"];
|
||||
|
||||
//[_targetAI,"defend",15] spawn SAR_circle_static;
|
||||
|
||||
/* if (vehicle _targetAI == _targetAI) then {
|
||||
doMedicAnim = [_targetAI,"Medic"];
|
||||
publicVariable "doMedicAnim";
|
||||
};
|
||||
|
||||
r_interrupt = false;
|
||||
_animState = animationState _targetAI;
|
||||
r_doLoop = true;
|
||||
_started = false;
|
||||
_finished = false;
|
||||
while {r_doLoop} do {
|
||||
_animState = animationState _targetAI;
|
||||
_isMedic = ["medic",_animState] call fnc_inString;
|
||||
if (_isMedic) then {
|
||||
_started = true;
|
||||
};
|
||||
if (_started && {!_isMedic}) then {
|
||||
r_doLoop = false;
|
||||
_finished = true;
|
||||
};
|
||||
if (r_interrupt) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
sleep 0.1;
|
||||
};
|
||||
r_doLoop = false;
|
||||
|
||||
if (_finished) then {
|
||||
_actingPlayer setVariable["LastTransfusion",time,true];
|
||||
_actingPlayer setVariable["USEC_lowBlood",false,true];
|
||||
_actingPlayer removeMagazine "ItemBloodbag";
|
||||
["usecTransfuse",[_actingPlayer,_targetAI]] call broadcastRpcCallAll;
|
||||
|
||||
} else {
|
||||
r_interrupt = false;
|
||||
doMedicAnim = [_targetAI,"Stop"];
|
||||
publicVariable "doMedicAnim";
|
||||
}; */
|
@ -1,102 +0,0 @@
|
||||
/*
|
||||
# Original #
|
||||
Sarge AI System 1.5
|
||||
Created for Arma 2: DayZ Mod
|
||||
Author: Sarge
|
||||
https://github.com/Swiss-Sarge
|
||||
|
||||
# Fork #
|
||||
Sarge AI System 2.0+
|
||||
Modded for Arma 3: Exile Mod
|
||||
Changes: Dango
|
||||
https://www.hod-servers.com
|
||||
|
||||
*/
|
||||
private ["_ai","_sleeptime","_veh_weapons","_vehicle","_weapons","_reloadmag","_magazintypes","_legit_weapon","_weap_obj"];
|
||||
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
_ai = _this select 0;
|
||||
|
||||
_magazintypes =[];
|
||||
_reloadmag = false;
|
||||
_weapons = weapons _ai;
|
||||
|
||||
_sleeptime = SAR_REAMMO_INTERVAL;
|
||||
|
||||
while {alive _ai} do {
|
||||
|
||||
_vehicle = vehicle _ai;
|
||||
if(_vehicle != _ai) then { // NPC in vehicle, we are only reloading vehicle ammo and refueling the vehicle if needed
|
||||
|
||||
// check if low on ammo & fuel
|
||||
_veh_weapons = weapons _vehicle;
|
||||
|
||||
_legit_weapon = false;
|
||||
{
|
||||
if (!([_x,"CarHorn"] call SAR_isKindOf_weapon)) then {
|
||||
_legit_weapon = true;
|
||||
_weap_obj = _x;
|
||||
};
|
||||
} foreach _veh_weapons;
|
||||
|
||||
if(_legit_weapon) then {
|
||||
|
||||
if(_vehicle ammo _weap_obj < 11) then {
|
||||
_vehicle setVehicleAmmo 1;
|
||||
if (SAR_EXTREME_DEBUG) then {diag_log "SAR EXTREME DEBUG: Vehicle got new ammo";};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
if(fuel _vehicle < 0.2) then {
|
||||
_vehicle setFuel 1;
|
||||
if (SAR_EXTREME_DEBUG) then {diag_log "SAR_EXTREME_DEBUG: Vehicle refueled";};
|
||||
};
|
||||
|
||||
} else { // NPC not in a vehicle
|
||||
|
||||
// loop through weapons array
|
||||
{
|
||||
// check if weapon rifle exists on AI
|
||||
if([_x,"Rifle"] call SAR_isKindOf_weapon) then {
|
||||
|
||||
_reloadmag = true;
|
||||
_magazintypes = getArray (configFile >> "CfgWeapons" >> _x >> "magazines");
|
||||
|
||||
// loop through valid magazines of weapon and check if there is a magazine for that weapon on the AI
|
||||
{
|
||||
if (_x in magazines _ai) then {
|
||||
_reloadmag = false;
|
||||
};
|
||||
} foreach _magazintypes;
|
||||
|
||||
if (!(someAmmo _ai) || {_reloadmag}) then {
|
||||
_ai removeMagazines (_magazintypes select 0);
|
||||
_ai addMagazine (_magazintypes select 0);
|
||||
if (SAR_EXTREME_DEBUG) then {diag_log format["SAR_EXTREME_DEBUG: Infantry reloaded a magazine (%1) for a rifle (%2).",(_magazintypes select 0),_x];};
|
||||
};
|
||||
};
|
||||
|
||||
if([_x,"Pistol"] call SAR_isKindOf_weapon) then {
|
||||
|
||||
_reloadmag = true;
|
||||
_magazintypes = getArray (configFile >> "CfgWeapons" >> _x >> "magazines");
|
||||
// loop through valid magazines of weapon and check if there is a magazine for that weapon on the AI
|
||||
{
|
||||
if (_x in magazines _ai) then {
|
||||
_reloadmag = false;
|
||||
};
|
||||
} foreach _magazintypes;
|
||||
|
||||
if (!(someAmmo _ai) || {_reloadmag}) then {
|
||||
_ai removeMagazines (_magazintypes select 0);
|
||||
_ai addMagazine (_magazintypes select 0);
|
||||
if (SAR_EXTREME_DEBUG) then {diag_log "SAR_EXTREME_DEBUG: Infantry reloaded a magazine for a pistol.";};
|
||||
};
|
||||
};
|
||||
|
||||
} foreach _weapons;
|
||||
};
|
||||
sleep _sleeptime;
|
||||
};
|
@ -1,336 +0,0 @@
|
||||
/*
|
||||
# Original #
|
||||
Sarge AI System 1.5
|
||||
Created for Arma 2: DayZ Mod
|
||||
Author: Sarge
|
||||
https://github.com/Swiss-Sarge
|
||||
|
||||
# Fork #
|
||||
Sarge AI System 2.0+
|
||||
Modded for Arma 3: Exile Mod
|
||||
Changes: Dango
|
||||
https://www.hod-servers.com
|
||||
|
||||
*/
|
||||
private ["_leadername","_type","_patrol_area_name","_grouptype","_snipers","_riflemen","_action","_side","_leaderList","_riflemenlist","_sniperlist","_rndpos","_group","_leader","_cond","_respawn","_leader_weapon_names","_leader_items","_leader_tools","_soldier_weapon_names","_soldier_items","_soldier_tools","_sniper_weapon_names","_sniper_items","_sniper_tools","_leaderskills","_riflemanskills","_sniperskills","_ups_para_list","_respawn_time","_argc","_ai_type"];
|
||||
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
_patrol_area_name = _this select 0;
|
||||
_grouptype = _this select 1;
|
||||
_snipers = _this select 2;
|
||||
_riflemen = _this select 3;
|
||||
_action = toLower (_this select 4);
|
||||
_respawn = _this select 5;
|
||||
|
||||
_argc = count _this;
|
||||
if (_argc > 6) then {
|
||||
_respawn_time = _this select 6;
|
||||
} else {
|
||||
_respawn_time = SAR_respawn_waittime;
|
||||
};
|
||||
|
||||
switch (_grouptype) do
|
||||
{
|
||||
case 1: // military
|
||||
{
|
||||
_side = SAR_AI_friendly_side;
|
||||
_type = "sold";
|
||||
_ai_type = "AI Military";
|
||||
};
|
||||
case 2: // survivors
|
||||
{
|
||||
_side = SAR_AI_friendly_side;
|
||||
_type = "surv";
|
||||
_ai_type = "AI Survivor";
|
||||
};
|
||||
case 3: // bandits
|
||||
{
|
||||
_side = SAR_AI_unfriendly_side;
|
||||
_type = "band";
|
||||
_ai_type = "AI Bandit";
|
||||
};
|
||||
};
|
||||
|
||||
_leaderList = call compile format ["SAR_leader_%1_list", _type];
|
||||
_leaderskills = call compile format ["SAR_leader_%1_skills", _type];
|
||||
|
||||
// get a random starting position that is on land
|
||||
_rndpos = [_patrol_area_name,0,SAR_Blacklist] call UPSMON_pos;
|
||||
|
||||
_group = createGroup _side;
|
||||
|
||||
// create leader of the group
|
||||
_leader = _group createunit [_leaderList call BIS_fnc_selectRandom, [(_rndpos select 0) , _rndpos select 1, 0], [], 0.5, "CAN_COLLIDE"];
|
||||
|
||||
_leader_weapon_names = ["leader",_type] call SAR_unit_loadout_weapons;
|
||||
_leader_items = ["leader",_type] call SAR_unit_loadout_items;
|
||||
_leader_tools = ["leader",_type] call SAR_unit_loadout_tools;
|
||||
|
||||
[_leader,_leader_weapon_names,_leader_items,_leader_tools] call SAR_unit_loadout;
|
||||
|
||||
if (_side == SAR_AI_unfriendly_side) then {removeHeadgear _leader; _leader addHeadGear (["H_Shemag_olive","H_Shemag_olive_hs","H_ShemagOpen_khk","H_ShemagOpen_tan"] call BIS_fnc_selectRandom);};
|
||||
|
||||
[_leader] spawn SAR_AI_trace;
|
||||
_leader setIdentity "id_SAR_sold_lead";
|
||||
[_leader] spawn SAR_AI_reammo;
|
||||
|
||||
_leader addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}];
|
||||
_leader addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}];
|
||||
|
||||
_leader addEventHandler ["HandleDamage",{if (_this select 1!="") then {_unit=_this select 0;damage _unit+((_this select 2)-damage _unit)*SAR_leader_health_factor}}];
|
||||
|
||||
[_leader, ["Help Me!", {
|
||||
//Parameters:
|
||||
//_leader = the leader of the group
|
||||
//_action = the action to execute while forming a circle
|
||||
//_radius = the radius of the circle
|
||||
private ["_center","_defend","_veh","_angle","_dir","_newpos","_forEachIndex","_leader","_action","_grp","_pos","_units","_count","_viewangle","_radius"];
|
||||
|
||||
_count = 0;
|
||||
|
||||
diag_log "SAR_AI: Group should form a circle";
|
||||
|
||||
_leader = _this select 0;
|
||||
//_action = _this select 1;
|
||||
_action = "defend";
|
||||
//_radius = _this select 2;
|
||||
_radius = 15;
|
||||
|
||||
_grp = group _leader;
|
||||
_defend = false;
|
||||
_units = units _grp;
|
||||
_count = count _units;
|
||||
|
||||
if(_count > 1) then { // only do this for groups > 1 unit
|
||||
|
||||
_pos = getposASL _leader;
|
||||
_pos = (_leader) modelToWorld[0,0,0];
|
||||
|
||||
doStop _leader;
|
||||
sleep .5;
|
||||
|
||||
//play leader stop animation
|
||||
_leader playAction "gestureFreeze";
|
||||
sleep 2;
|
||||
|
||||
if (_action == "defend") then {
|
||||
_center = _leader;
|
||||
_leader forceSpeed 0;
|
||||
_defend = true;
|
||||
|
||||
_leader disableAI "move";
|
||||
_leader setunitpos "up";
|
||||
_leader disableAI "target";
|
||||
|
||||
_grp enableAttack false;
|
||||
["NOAI"] spawn UPSMON;
|
||||
};
|
||||
|
||||
if (_action == "campfire") then {
|
||||
_veh = createvehicle ["Land_Campfire_burning",_pos,[],0,"NONE"];
|
||||
_center = _veh;
|
||||
};
|
||||
|
||||
if (_defend) then {
|
||||
_angle = 360/(_count-1);
|
||||
} else {
|
||||
_angle = 360/(_count);
|
||||
};
|
||||
|
||||
_grp enableGunLights "AUTO";
|
||||
_grp setBehaviour "CARELESS";
|
||||
|
||||
{
|
||||
if (_x != _leader || {_x == _leader && !_defend}) then {
|
||||
|
||||
_newpos = (_center modelToWorld [(sin (_forEachIndex * _angle))*_radius, (cos (_forEachIndex *_angle))*_radius, 0]);
|
||||
//diag_log format["Newpos %1: %2",_foreachindex,_newpos];
|
||||
|
||||
if (_defend) then {
|
||||
_dir = 0;
|
||||
} else {
|
||||
_dir = 180;
|
||||
};
|
||||
|
||||
_viewangle = (_foreachIndex * _angle) pushBack _dir;
|
||||
[_x,_pos,_newpos,_viewangle,_defend]spawn SAR_move_to_circle_pos;
|
||||
};
|
||||
} foreach _units;
|
||||
//_leader disableAI "MOVE";
|
||||
};
|
||||
|
||||
}]] remoteExec ["addAction", 0, true];
|
||||
|
||||
//["I need assistance!",{"sarge\SAR_interact.sqf","",1,true,true,"","(side _target != EAST)"}]
|
||||
//_leader addaction ["Help Me!", {"sarge\SAR_interact.sqf" remoteExec [ "BIS_fnc_execVM",0]}];
|
||||
|
||||
[_leader] join _group;
|
||||
|
||||
// set skills of the leader
|
||||
{
|
||||
_leader setskill [_x select 0,(_x select 1 +(floor(random 2) * (_x select 2)))];
|
||||
} foreach _leaderskills;
|
||||
|
||||
SAR_leader_number = SAR_leader_number + 1;
|
||||
_leadername = format["SAR_leader_%1",SAR_leader_number];
|
||||
|
||||
_leader setVehicleVarname _leadername;
|
||||
_leader setVariable ["SAR_leader_name",_leadername,false];
|
||||
|
||||
// store AI type on the AI
|
||||
_leader setVariable ["SAR_AI_type",_ai_type + " Leader",false];
|
||||
|
||||
// store experience value on AI
|
||||
_leader setVariable ["SAR_AI_experience",0,false];
|
||||
|
||||
/* // set behaviour & speedmode
|
||||
_leader setspeedmode "FULL";
|
||||
_leader setBehaviour "AWARE"; */
|
||||
|
||||
// Establish siper unit type and skills
|
||||
_sniperlist = call compile format ["SAR_sniper_%1_list", _type];
|
||||
_sniperskills = call compile format ["SAR_sniper_%1_skills", _type];
|
||||
|
||||
// create crew
|
||||
for "_i" from 0 to (_snipers - 1) do
|
||||
{
|
||||
_this = _group createunit [_sniperlist call BIS_fnc_selectRandom, [(_rndpos select 0), _rndpos select 1, 0], [], 0.5, "CAN_COLLIDE"];
|
||||
|
||||
_sniper_weapon_names = ["sniper",_type] call SAR_unit_loadout_weapons;
|
||||
_sniper_items = ["sniper",_type] call SAR_unit_loadout_items;
|
||||
_sniper_tools = ["sniper",_type] call SAR_unit_loadout_tools;
|
||||
|
||||
[_this,_sniper_weapon_names,_sniper_items,_sniper_tools] call SAR_unit_loadout;
|
||||
|
||||
if (_side == SAR_AI_unfriendly_side) then {removeHeadgear _this; _this addHeadGear (["H_Shemag_olive","H_Shemag_olive_hs","H_ShemagOpen_khk","H_ShemagOpen_tan"] call BIS_fnc_selectRandom);};
|
||||
|
||||
[_this] spawn SAR_AI_trace;
|
||||
_this setIdentity "id_SAR";
|
||||
[_this] spawn SAR_AI_reammo;
|
||||
|
||||
_this addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}];
|
||||
_this addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}];
|
||||
|
||||
_this addEventHandler ["HandleDamage",{if (_this select 1!="") then {_unit=_this select 0;damage _unit+((_this select 2)-damage _unit)*1}}];
|
||||
|
||||
[_this] join _group;
|
||||
|
||||
// set skills
|
||||
{
|
||||
_this setskill [_x select 0,(_x select 1 +(floor(random 2) * (_x select 2)))];
|
||||
} foreach _sniperskills;
|
||||
|
||||
// store AI type on the AI
|
||||
_this setVariable ["SAR_AI_type",_ai_type,false];
|
||||
|
||||
// store experience value on AI
|
||||
_this setVariable ["SAR_AI_experience",0,false];
|
||||
};
|
||||
|
||||
// Establish rifleman unit type and skills
|
||||
_riflemenlist = call compile format ["SAR_soldier_%1_list", _type];
|
||||
_riflemanskills = call compile format ["SAR_soldier_%1_skills", _type];
|
||||
|
||||
for "_i" from 0 to (_riflemen - 1) do
|
||||
{
|
||||
_this = _group createunit [_riflemenlist call BIS_fnc_selectRandom, [(_rndpos select 0) , _rndpos select 1, 0], [], 0.5, "CAN_COLLIDE"];
|
||||
|
||||
_soldier_items = ["rifleman",_type] call SAR_unit_loadout_items;
|
||||
_soldier_tools = ["rifleman",_type] call SAR_unit_loadout_tools;
|
||||
_soldier_weapon_names = ["rifleman",_type] call SAR_unit_loadout_weapons;
|
||||
|
||||
[_this,_soldier_weapon_names,_soldier_items,_soldier_tools] call SAR_unit_loadout;
|
||||
|
||||
if (_side == SAR_AI_unfriendly_side) then {removeHeadgear _this; _this addHeadGear (["H_Shemag_olive","H_Shemag_olive_hs","H_ShemagOpen_khk","H_ShemagOpen_tan"] call BIS_fnc_selectRandom);};
|
||||
|
||||
[_this] spawn SAR_AI_trace;
|
||||
_this setIdentity "id_SAR_sold_man";
|
||||
[_this] spawn SAR_AI_reammo;
|
||||
|
||||
_this addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}];
|
||||
_this addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}];
|
||||
|
||||
_this addEventHandler ["HandleDamage",{if (_this select 1!="") then {_unit=_this select 0;damage _unit+((_this select 2)-damage _unit)*1}}];
|
||||
|
||||
[_this] join _group;
|
||||
|
||||
// set skills
|
||||
{
|
||||
_this setskill [_x select 0,(_x select 1 +(floor(random 2) * (_x select 2)))];
|
||||
} foreach _riflemanskills;
|
||||
|
||||
// store AI type on the AI
|
||||
_this setVariable ["SAR_AI_type",_ai_type,false];
|
||||
|
||||
// store experience value on AI
|
||||
_this setVariable ["SAR_AI_experience",0,false];
|
||||
};
|
||||
|
||||
// initialize upsmon for the group
|
||||
_ups_para_list = [_leader,_patrol_area_name,'FULL','AWARE','NOSHARE','NOFOLLOW','AWARE','SPAWNED','DELETE:',SAR_DELETE_TIMEOUT];
|
||||
|
||||
if (!SAR_AI_STEAL_VEHICLE) then {
|
||||
_ups_para_list pushBack ['NOVEH2'];
|
||||
};
|
||||
|
||||
if (SAR_AI_disable_UPSMON_AI) then {
|
||||
_ups_para_list pushBack ['NOAI'];
|
||||
};
|
||||
|
||||
if (_respawn) then {
|
||||
_ups_para_list pushBack ['RESPAWN'];
|
||||
_ups_para_list pushBack ['RESPAWNTIME:'];
|
||||
_ups_para_list pushBack [_respawn_time];
|
||||
};
|
||||
|
||||
if(_action == "") then {_action = "PATROL";};
|
||||
|
||||
switch (_action) do {
|
||||
|
||||
case "NOUPSMON":
|
||||
{
|
||||
};
|
||||
case "FORTIFY":
|
||||
{
|
||||
_ups_para_list pushBack ['FORTIFY'];
|
||||
_ups_para_list spawn UPSMON;
|
||||
};
|
||||
case "PATROL":
|
||||
{
|
||||
_ups_para_list spawn UPSMON;
|
||||
};
|
||||
case "AMBUSH2":
|
||||
{
|
||||
_ups_para_list pushBack ['AMBUSH'];
|
||||
_ups_para_list spawn UPSMON;
|
||||
};
|
||||
default
|
||||
{
|
||||
_ups_para_list spawn UPSMON;
|
||||
};
|
||||
};
|
||||
|
||||
if (SAR_DEBUG) then {
|
||||
diag_log format ["Sarge's AI System: Infantry group (%3) spawned in: %1 with action: %2 on side: %4",_patrol_area_name,_action,_group,(side _group)];
|
||||
};
|
||||
|
||||
if (SAR_HC) then {
|
||||
{
|
||||
_hcID = getPlayerUID _x;
|
||||
if(_hcID select [0,2] isEqualTo 'HC')then {
|
||||
_SAIS_HC = _group setGroupOwner (owner _x);
|
||||
if (_SAIS_HC) then {
|
||||
if (SAR_DEBUG) then {
|
||||
diag_log format ["Sarge's AI System: Now moving group %1 to Headless Client %2",_group,_hcID];
|
||||
};
|
||||
} else {
|
||||
if (SAR_DEBUG) then {
|
||||
diag_log format ["Sarge's AI System: ERROR! Moving group %1 to Headless Client %2 has failed!",_group,_hcID];
|
||||
};
|
||||
};
|
||||
};
|
||||
} forEach allPlayers;
|
||||
};
|
||||
|
||||
_group;
|
@ -1,270 +0,0 @@
|
||||
/*
|
||||
# Original #
|
||||
Sarge AI System 1.5
|
||||
Created for Arma 2: DayZ Mod
|
||||
Author: Sarge
|
||||
https://github.com/Swiss-Sarge
|
||||
|
||||
# Fork #
|
||||
Sarge AI System 2.0+
|
||||
Modded for Arma 3: Exile Mod
|
||||
Changes: Dango
|
||||
https://www.hod-servers.com
|
||||
|
||||
*/
|
||||
private ["_sizeOfBase","_authorizedGateCodes","_authorizedUID","_flagPole","_leadername","_type","_patrol_area_name","_grouptype","_snipers","_riflemen","_action","_side","_leaderList","_riflemenlist","_sniperlist","_rndpos","_group","_leader","_cond","_respawn","_leader_weapon_names","_leader_items","_leader_tools","_soldier_weapon_names","_soldier_items","_soldier_tools","_sniper_weapon_names","_sniper_items","_sniper_tools","_leaderskills","_riflemanskills","_sniperskills","_ups_para_list","_respawn_time","_argc","_ai_type"];
|
||||
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
diag_log "Sarge AI System: Territory gaurds are initializing now.";
|
||||
|
||||
_argc = count _this;
|
||||
_flagPole = _this select 0;
|
||||
_patrol_area_name = _this select 1;
|
||||
_grouptype = _this select 2;
|
||||
_snipers = _this select 3;
|
||||
_riflemen = _this select 4;
|
||||
_action = tolower (_this select 5);
|
||||
_respawn = _this select 6;
|
||||
if (_argc > 7) then {
|
||||
_respawn_time = _this select 7;
|
||||
} else {
|
||||
_respawn_time = SAR_respawn_waittime;
|
||||
};
|
||||
|
||||
_authorizedUID = _flagPole getVariable ["ExileTerritoryBuildRights", []];
|
||||
|
||||
switch (_grouptype) do
|
||||
{
|
||||
case 1: // military
|
||||
{
|
||||
_side = SAR_AI_friendly_side;
|
||||
_type = "sold";
|
||||
_ai_type = "AI Military";
|
||||
};
|
||||
case 2: // survivors
|
||||
{
|
||||
_side = SAR_AI_friendly_side;
|
||||
_type = "surv";
|
||||
_ai_type = "AI Survivor";
|
||||
};
|
||||
case 3: // bandits
|
||||
{
|
||||
_side = SAR_AI_unfriendly_side;
|
||||
_type = "band";
|
||||
_ai_type = "AI Bandit";
|
||||
};
|
||||
};
|
||||
|
||||
_leaderList = call compile format ["SAR_leader_%1_list",_type];
|
||||
|
||||
_leaderskills = call compile format ["SAR_leader_%1_skills",_type];
|
||||
_riflemanskills = call compile format ["SAR_soldier_%1_skills",_type];
|
||||
_sniperskills = call compile format ["SAR_sniper_%1_skills",_type];
|
||||
|
||||
_rndpos = [_patrol_area_name,0,SAR_Blacklist] call UPSMON_pos;
|
||||
|
||||
_group = createGroup _side;
|
||||
|
||||
_group setVariable ["SAR_protect",true,true];
|
||||
|
||||
_sizeOfBase = _flagPole getVariable ["ExileTerritorySize",""];
|
||||
|
||||
// create leader of the group
|
||||
_leader = _group createunit [_leaderList call BIS_fnc_selectRandom, [getPosATL _flagPole,1,_sizeOfBase,5,0,10,0] call BIS_fnc_findSafePos, [], 0.5, "CAN_COLLIDE"];
|
||||
|
||||
_leader_weapon_names = ["leader",_type] call SAR_unit_loadout_weapons;
|
||||
_leader_items = ["leader",_type] call SAR_unit_loadout_items;
|
||||
_leader_tools = ["leader",_type] call SAR_unit_loadout_tools;
|
||||
|
||||
[_leader,_leader_weapon_names,_leader_items,_leader_tools] call SAR_unit_loadout;
|
||||
|
||||
if (_side == SAR_AI_unfriendly_side) then {removeHeadgear _this; _this addHeadGear (["H_Shemag_olive","H_Shemag_olive_hs","H_ShemagOpen_khk","H_ShemagOpen_tan"] call BIS_fnc_selectRandom);};
|
||||
|
||||
[_leader] spawn SAR_AI_base_trace;
|
||||
_leader setIdentity "id_SAR_sold_lead";
|
||||
[_leader] spawn SAR_AI_reammo;
|
||||
|
||||
_leader addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}];
|
||||
_leader addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}];
|
||||
/*
|
||||
// TODO: Convert to Exile friendly action
|
||||
_cond="(side _this == west) && (side _target == resistance) && ('ItemBloodbag' in magazines _this)";
|
||||
[nil,_leader,rADDACTION,"Give me a blood transfusion!", "sarge\SAR_interact.sqf","",1,true,true,"",_cond] call RE;
|
||||
*/
|
||||
[_leader] joinSilent _group;
|
||||
|
||||
// set skills of the leader
|
||||
{
|
||||
_leader setskill [_x select 0,(_x select 1 +(floor(random 2) * (_x select 2)))];
|
||||
} foreach _leaderskills;
|
||||
|
||||
// store AI type on the AI
|
||||
_leader setVariable ["SAR_AI_type",_ai_type + " Leader",false];
|
||||
|
||||
// store experience value on AI
|
||||
_leader setVariable ["SAR_AI_experience",0,false];
|
||||
|
||||
_leader setVariable ["SAR_FLAG_FRIENDLY", _authorizedUID, true];
|
||||
_leader setVariable ["ATTACK_ALL", false, true];
|
||||
|
||||
// set behaviour & speedmode
|
||||
_leader setspeedmode "FULL";
|
||||
_leader setBehaviour "AWARE";
|
||||
|
||||
_sniperlist = call compile format ["SAR_sniper_%1_list",_type];
|
||||
|
||||
// create crew
|
||||
for "_i" from 0 to (_snipers - 1) do
|
||||
{
|
||||
|
||||
_this = _group createunit [_sniperlist call BIS_fnc_selectRandom, [getPosATL _flagPole,1,_sizeOfBase,5,0,10,0] call BIS_fnc_findSafePos, [], 0.5, "CAN_COLLIDE"];
|
||||
|
||||
_sniper_weapon_names = ["sniper",_type] call SAR_unit_loadout_weapons;
|
||||
_sniper_items = ["sniper",_type] call SAR_unit_loadout_items;
|
||||
_sniper_tools = ["sniper",_type] call SAR_unit_loadout_tools;
|
||||
|
||||
[_this,_sniper_weapon_names,_sniper_items,_sniper_tools] call SAR_unit_loadout;
|
||||
|
||||
if (_side == SAR_AI_unfriendly_side) then {removeHeadgear _this; _this addHeadGear (["H_Shemag_olive","H_Shemag_olive_hs","H_ShemagOpen_khk","H_ShemagOpen_tan"] call BIS_fnc_selectRandom);};
|
||||
|
||||
[_this] spawn SAR_AI_base_trace;
|
||||
_this setIdentity "id_SAR";
|
||||
[_this] spawn SAR_AI_reammo;
|
||||
|
||||
_this addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}];
|
||||
_this addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}];
|
||||
|
||||
[_this] joinSilent _group;
|
||||
|
||||
// set skills
|
||||
{
|
||||
_this setskill [_x select 0,(_x select 1 +(floor(random 2) * (_x select 2)))];
|
||||
} foreach _sniperskills;
|
||||
|
||||
//[nil,_this,rADDACTION,"Give me a blood transfusion!", "sarge\SAR_interact.sqf","",1,true,true,"",_cond] call RE;
|
||||
|
||||
// store AI type on the AI
|
||||
_this setVariable ["SAR_AI_type",_ai_type,false];
|
||||
|
||||
// store experience value on AI
|
||||
_this setVariable ["SAR_AI_experience",0,false];
|
||||
|
||||
_this setVariable ["SAR_FLAG_FRIENDLY", _authorizedUID, true];
|
||||
_this setVariable ["ATTACK_ALL", false, true];
|
||||
|
||||
//Distinguish AI
|
||||
_this setVariable ["Sarge",1,true];
|
||||
};
|
||||
|
||||
_riflemenlist = call compile format ["SAR_soldier_%1_list",_type];
|
||||
|
||||
for "_i" from 0 to (_riflemen - 1) do
|
||||
{
|
||||
_this = _group createunit [_riflemenlist call BIS_fnc_selectRandom, [getPosATL _flagPole,1,_sizeOfBase,5,0,10,0] call BIS_fnc_findSafePos, [], 0.5, "CAN_COLLIDE"];
|
||||
|
||||
_soldier_items = ["rifleman",_type] call SAR_unit_loadout_items;
|
||||
_soldier_tools = ["rifleman",_type] call SAR_unit_loadout_tools;
|
||||
_soldier_weapon_names = ["rifleman",_type] call SAR_unit_loadout_weapons;
|
||||
|
||||
[_this,_soldier_weapon_names,_soldier_items,_soldier_tools] call SAR_unit_loadout;
|
||||
|
||||
if (_side == SAR_AI_unfriendly_side) then {removeHeadgear _this; _this addHeadGear (["H_Shemag_olive","H_Shemag_olive_hs","H_ShemagOpen_khk","H_ShemagOpen_tan"] call BIS_fnc_selectRandom);};
|
||||
|
||||
[_this] spawn SAR_AI_base_trace;
|
||||
_this setIdentity "id_SAR_sold_man";
|
||||
[_this] spawn SAR_AI_reammo;
|
||||
|
||||
_this addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}];
|
||||
_this addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}];
|
||||
|
||||
[_this] joinSilent _group;
|
||||
|
||||
// set skills
|
||||
{
|
||||
_this setskill [_x select 0,(_x select 1) * (_x select 2)];
|
||||
} foreach _riflemanskills;
|
||||
|
||||
//[nil,_this,rADDACTION,"Give me a blood transfusion!", "sarge\SAR_interact.sqf","",1,true,true,"",_cond] call RE;
|
||||
|
||||
// store AI type on the AI
|
||||
_this setVariable ["SAR_AI_type",_ai_type,false];
|
||||
|
||||
// store experience value on AI
|
||||
_this setVariable ["SAR_AI_experience",0,false];
|
||||
|
||||
//flagpole settings
|
||||
_this setVariable ["SAR_FLAG_FRIENDLY", _authorizedUID, true];
|
||||
_this setVariable ["ATTACK_ALL", false, true];
|
||||
|
||||
//Distinguish AI
|
||||
_this setVariable ["Sarge",1,true];
|
||||
};
|
||||
|
||||
// initialize upsmon for the group
|
||||
_ups_para_list = [_leader,_patrol_area_name,'NOFOLLOW','AWARE','SPAWNED','DELETE:',SAR_DELETE_TIMEOUT];
|
||||
|
||||
if (_respawn) then {
|
||||
_ups_para_list pushBack ['RESPAWN'];
|
||||
_ups_para_list pushBack ['RESPAWN TIME:'];
|
||||
_ups_para_list pushBack [_respawn_time];
|
||||
};
|
||||
|
||||
if(!SAR_AI_STEAL_VEHICLE) then {
|
||||
_ups_para_list pushBack ['NOVEH'];
|
||||
};
|
||||
|
||||
if(SAR_AI_disable_UPSMON_AI) then {
|
||||
_ups_para_list pushBack ['NOAI'];
|
||||
};
|
||||
|
||||
if(_action == "") then {_action = "PATROL";};
|
||||
|
||||
switch (_action) do {
|
||||
|
||||
case "NOUPSMON":
|
||||
{
|
||||
};
|
||||
case "FORTIFY":
|
||||
{
|
||||
_ups_para_list pushBack ['FORTIFY'];
|
||||
_ups_para_list spawn UPSMON;
|
||||
};
|
||||
case "PATROL":
|
||||
{
|
||||
_ups_para_list spawn UPSMON;
|
||||
};
|
||||
case "AMBUSH":
|
||||
{
|
||||
_ups_para_list pushBack ['AMBUSH'];
|
||||
_ups_para_list spawn UPSMON;
|
||||
};
|
||||
default
|
||||
{
|
||||
_ups_para_list spawn UPSMON;
|
||||
};
|
||||
};
|
||||
|
||||
if(SAR_DEBUG) then {
|
||||
diag_log format["Sarge's AI System: Territory group (%3) spawned in: %1 with action: %2 on side: %4",_patrol_area_name,_action,_group,(side _group)];
|
||||
};
|
||||
|
||||
if (SAR_HC) then {
|
||||
{
|
||||
_hcID = getPlayerUID _x;
|
||||
if(_hcID select [0,2] isEqualTo 'HC')then {
|
||||
_SAIS_HC = _group setGroupOwner (owner _x);
|
||||
if (_SAIS_HC) then {
|
||||
if (SAR_DEBUG) then {
|
||||
diag_log format ["Sarge's AI System: Now moving group %1 to Headless Client %2",_group,_hcID];
|
||||
};
|
||||
} else {
|
||||
if (SAR_DEBUG) then {
|
||||
diag_log format ["Sarge's AI System: ERROR! Moving group %1 to Headless Client %2 has failed!",_group,_hcID];
|
||||
};
|
||||
};
|
||||
};
|
||||
} forEach allPlayers;
|
||||
};
|
||||
|
||||
_group;
|
@ -1,242 +0,0 @@
|
||||
/*
|
||||
# Original #
|
||||
Sarge AI System 1.5
|
||||
Created for Arma 2: DayZ Mod
|
||||
Author: Sarge
|
||||
https://github.com/Swiss-Sarge
|
||||
|
||||
# Fork #
|
||||
Sarge AI System 2.0+
|
||||
Modded for Arma 3: Exile Mod
|
||||
Changes: Dango
|
||||
https://www.hod-servers.com
|
||||
|
||||
*/
|
||||
private ["_ai_type","_riflemenlist","_side","_leader_group","_patrol_area_name","_rndpos","_groupheli","_heli","_leader","_man2heli","_man3heli","_argc","_grouptype","_respawn","_leader_weapon_names","_leader_items","_leader_tools","_soldier_weapon_names","_soldier_items","_soldier_tools","_leaderskills","_sniperskills","_ups_para_list","_type","_error","_respawn_time","_leadername"];
|
||||
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
_patrol_area_name = _this select 0;
|
||||
_argc = count _this;
|
||||
_error = false;
|
||||
|
||||
if (_argc > 1) then {
|
||||
_grouptype = _this select 1;
|
||||
switch (_grouptype) do
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
_side = SAR_AI_friendly_side;
|
||||
_type = "sold";
|
||||
_ai_type = "AI Military";
|
||||
_ai_id = "id_SAR_sold_man";
|
||||
};
|
||||
case 2:
|
||||
{
|
||||
_side = SAR_AI_friendly_side;
|
||||
_type = "surv";
|
||||
_ai_type = "AI Survivor";
|
||||
_ai_id = "id_SAR_surv_lead";
|
||||
};
|
||||
case 3:
|
||||
{
|
||||
_side = SAR_AI_unfriendly_side;
|
||||
_type = "band";
|
||||
_ai_type = "AI Bandit";
|
||||
_ai_id = "id_SAR_band";
|
||||
};
|
||||
};
|
||||
} else {
|
||||
_error = true;
|
||||
};
|
||||
|
||||
if (_argc > 2) then {
|
||||
_respawn = _this select 2;
|
||||
} else {
|
||||
_respawn = false;
|
||||
};
|
||||
|
||||
if (_argc > 3) then {
|
||||
_respawn_time = _this select 3;
|
||||
} else {
|
||||
_respawn_time = SAR_respawn_waittime;
|
||||
};
|
||||
|
||||
if (_error) exitWith {diag_log "SAR_AI: Heli patrol setup failed, wrong parameters passed!";};
|
||||
|
||||
_leaderNPC = call compile format ["SAR_leader_%1_list",_type];
|
||||
_riflemenlist = call compile format ["SAR_soldier_%1_list",_type];
|
||||
|
||||
_leaderskills = call compile format ["SAR_leader_%1_skills",_type];
|
||||
_sniperskills = call compile format ["SAR_sniper_%1_skills",_type];
|
||||
|
||||
_leader_weapon_names = ["leader",_type] call SAR_unit_loadout_weapons;
|
||||
_leader_items = ["leader",_type] call SAR_unit_loadout_items;
|
||||
_leader_tools = ["leader",_type] call SAR_unit_loadout_tools;
|
||||
|
||||
// get a random starting position, UPSMON will handle the rest
|
||||
_rndpos = [_patrol_area_name,0,SAR_Blacklist] call UPSMON_pos;
|
||||
|
||||
_groupheli = createGroup _side;
|
||||
|
||||
// protect group from being deleted by DayZ
|
||||
_groupheli setVariable ["SAR_protect",true,true];
|
||||
|
||||
// create the vehicle
|
||||
_heli = createVehicle [(SAR_heli_type call BIS_fnc_selectRandom), [(_rndpos select 0) + 10, _rndpos select 1, 80], [], 0, "FLY"];
|
||||
_heli setFuel 1;
|
||||
_heli setVariable ["Sarge",1,true];
|
||||
_heli engineon true;
|
||||
_heli setVehicleAmmo 1;
|
||||
|
||||
[_heli] joinSilent _groupheli;
|
||||
sleep 1;
|
||||
|
||||
_leader = _groupheli createunit [(_leaderNPC call BIS_fnc_selectRandom), [(_rndpos select 0) + 10, _rndpos select 1, 0], [], 0.5, "CAN_COLLIDE"];
|
||||
|
||||
[_leader,_leader_weapon_names,_leader_items,_leader_tools] call SAR_unit_loadout;
|
||||
|
||||
if (_side == SAR_AI_unfriendly_side) then {removeHeadgear _leader; _leader addHeadGear (["H_Shemag_olive","H_Shemag_olive_hs","H_ShemagOpen_khk","H_ShemagOpen_tan"] call BIS_fnc_selectRandom);};
|
||||
|
||||
[_leader] spawn SAR_AI_trace_veh;
|
||||
switch (_grouptype) do
|
||||
{
|
||||
case 1:{_leader setIdentity "id_SAR_sold_man";};
|
||||
case 2:{_leader setIdentity "id_SAR_surv_lead";};
|
||||
case 3:{_leader setIdentity "id_SAR_band";};
|
||||
};
|
||||
[_leader] spawn SAR_AI_reammo;
|
||||
|
||||
_leader addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}];
|
||||
_leader addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}];
|
||||
|
||||
_leader moveInDriver _heli;
|
||||
_leader assignAsDriver _heli;
|
||||
|
||||
[_leader] joinSilent _groupheli;
|
||||
|
||||
// set skills of the leader
|
||||
{
|
||||
_leader setskill [_x select 0,(_x select 1 +(floor(random 2) * (_x select 2)))];
|
||||
} foreach _leaderskills;
|
||||
|
||||
// store AI type on the AI
|
||||
_leader setVariable ["SAR_AI_type",_ai_type + " Leader",false];
|
||||
|
||||
// store experience value on AI
|
||||
_leader setVariable ["SAR_AI_experience",0,false];
|
||||
|
||||
// set behaviour & speedmode
|
||||
_leader setspeedmode "FULL";
|
||||
_leader setBehaviour "AWARE";
|
||||
|
||||
// Gunner 1
|
||||
_man2heli = _groupheli createunit [_riflemenlist call BIS_fnc_selectRandom, [(_rndpos select 0) - 30, _rndpos select 1, 0], [], 0.5, "CAN_COLLIDE"];
|
||||
|
||||
_soldier_weapon_names = ["rifleman",_type] call SAR_unit_loadout_weapons;
|
||||
_soldier_items = ["rifleman",_type] call SAR_unit_loadout_items;
|
||||
_soldier_tools = ["rifleman",_type] call SAR_unit_loadout_tools;
|
||||
|
||||
[_man2heli,_soldier_weapon_names,_soldier_items,_soldier_tools] call SAR_unit_loadout;
|
||||
|
||||
if (_side == SAR_AI_unfriendly_side) then {removeHeadgear _man2heli; _man2heli addHeadGear (["H_Shemag_olive","H_Shemag_olive_hs","H_ShemagOpen_khk","H_ShemagOpen_tan"] call BIS_fnc_selectRandom);};
|
||||
|
||||
_man2heli moveInTurret [_heli,[0]];
|
||||
|
||||
[_man2heli] spawn SAR_AI_trace_veh;
|
||||
switch (_grouptype) do
|
||||
{
|
||||
case 1:{_man2heli setIdentity "id_SAR_sold_man";};
|
||||
case 2:{_man2heli setIdentity "id_SAR_surv_lead";};
|
||||
case 3:{_man2heli setIdentity "id_SAR_band";};
|
||||
};
|
||||
[_man2heli] spawn SAR_AI_reammo;
|
||||
|
||||
_man2heli addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}];
|
||||
_man2heli addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}];
|
||||
|
||||
[_man2heli] joinSilent _groupheli;
|
||||
|
||||
// set skills
|
||||
{
|
||||
_man2heli setskill [_x select 0,(_x select 1 +(floor(random 2) * (_x select 2)))];
|
||||
} foreach _sniperskills;
|
||||
|
||||
// store AI type on the AI
|
||||
_man2heli setVariable ["SAR_AI_type",_ai_type,false];
|
||||
|
||||
// store experience value on AI
|
||||
_man2heli setVariable ["SAR_AI_experience",0,false];
|
||||
|
||||
//Gunner 2
|
||||
_man3heli = _groupheli createunit [_riflemenlist call BIS_fnc_selectRandom, [_rndpos select 0, (_rndpos select 1) + 30, 0], [], 0.5, "CAN_COLLIDE"];
|
||||
|
||||
_soldier_weapon_names = ["rifleman",_type] call SAR_unit_loadout_weapons;
|
||||
_soldier_items = ["rifleman",_type] call SAR_unit_loadout_items;
|
||||
_soldier_tools = ["rifleman",_type] call SAR_unit_loadout_tools;
|
||||
|
||||
[_man3heli,_soldier_weapon_names,_soldier_items,_soldier_tools] call SAR_unit_loadout;
|
||||
|
||||
if (_side == SAR_AI_unfriendly_side) then {removeHeadgear _man3heli; _man3heli addHeadGear (["H_Shemag_olive","H_Shemag_olive_hs","H_ShemagOpen_khk","H_ShemagOpen_tan"] call BIS_fnc_selectRandom);};
|
||||
|
||||
_man3heli moveInTurret [_heli,[1]];
|
||||
|
||||
[_man3heli] spawn SAR_AI_trace_veh;
|
||||
switch (_grouptype) do
|
||||
{
|
||||
case 1:{_man3heli setIdentity "id_SAR_sold_man";};
|
||||
case 2:{_man3heli setIdentity "id_SAR_surv_lead";};
|
||||
case 3:{_man3heli setIdentity "id_SAR_band";};
|
||||
};
|
||||
[_man3heli] spawn SAR_AI_reammo;
|
||||
|
||||
_man3heli addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}];
|
||||
_man3heli addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}];
|
||||
|
||||
[_man3heli] joinSilent _groupheli;
|
||||
|
||||
// set skills
|
||||
{
|
||||
_man3heli setskill [_x select 0,(_x select 1 +(floor(random 2) * (_x select 2)))];
|
||||
} foreach _sniperskills;
|
||||
|
||||
// store AI type on the AI
|
||||
_man3heli setVariable ["SAR_AI_type",_ai_type,false];
|
||||
|
||||
// store experience value on AI
|
||||
_man3heli setVariable ["SAR_AI_experience",0,false];
|
||||
|
||||
// initialize upsmon for the group
|
||||
_ups_para_list = [_leader,_patrol_area_name,'NOFOLLOW','AWARE','SPAWNED','DELETE:',SAR_DELETE_TIMEOUT];
|
||||
|
||||
if (_respawn) then {
|
||||
_ups_para_list pushBack ['RESPAWN'];
|
||||
_ups_para_list pushBack ['RESPAWNTIME:'];
|
||||
_ups_para_list pushBack [_respawn_time];
|
||||
};
|
||||
|
||||
_ups_para_list spawn UPSMON;
|
||||
|
||||
if(SAR_DEBUG) then {
|
||||
diag_log format["Sarge's AI System: AI Heli patrol (%2) spawned in: %1.",_patrol_area_name,_groupheli];
|
||||
};
|
||||
|
||||
if (SAR_HC) then {
|
||||
{
|
||||
_hcID = getPlayerUID _x;
|
||||
if(_hcID select [0,2] isEqualTo 'HC')then {
|
||||
_SAIS_HC = _group setGroupOwner (owner _x);
|
||||
if (_SAIS_HC) then {
|
||||
if (SAR_DEBUG) then {
|
||||
diag_log format ["Sarge's AI System: Now moving group %1 to Headless Client %2",_group,_hcID];
|
||||
};
|
||||
} else {
|
||||
if (SAR_DEBUG) then {
|
||||
diag_log format ["Sarge's AI System: ERROR! Moving group %1 to Headless Client %2 has failed!",_group,_hcID];
|
||||
};
|
||||
};
|
||||
};
|
||||
} forEach allPlayers;
|
||||
};
|
||||
|
||||
_groupheli;
|
@ -1,299 +0,0 @@
|
||||
/*
|
||||
# Original #
|
||||
Sarge AI System 1.5
|
||||
Created for Arma 2: DayZ Mod
|
||||
Author: Sarge
|
||||
https://github.com/Swiss-Sarge
|
||||
|
||||
# Fork #
|
||||
Sarge AI System 2.0+
|
||||
Modded for Arma 3: Exile Mod
|
||||
Changes: Dango
|
||||
https://www.hod-servers.com
|
||||
|
||||
*/
|
||||
private ["_riflemenlist","_side","_leader_group","_patrol_area_name","_rndpos","_argc","_grouptype","_respawn","_leader_weapon_names","_leader_items","_leader_tools","_soldier_weapon_names","_soldier_items","_soldier_tools","_leaderskills","_sniperskills","_ups_para_list","_sniperlist","_riflemanskills","_vehicles","_error","_vehicles_crews","_leader","_leadername","_snipers","_riflemen","_veh","_veh_setup","_forEachIndex","_groupvehicles","_sniper_weapon_names","_sniper_items","_sniper_tools","_leader_veh_crew","_type","_respawn_time","_ai_type"];
|
||||
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
_patrol_area_name = _this select 0;
|
||||
|
||||
_error = false;
|
||||
_argc = count _this;
|
||||
|
||||
if (_argc > 1) then {
|
||||
|
||||
_grouptype = _this select 1;
|
||||
|
||||
switch (_grouptype) do
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
_side = SAR_AI_friendly_side;
|
||||
_type = "sold";
|
||||
_ai_type = "AI Military";
|
||||
_ai_id = "id_SAR_sold_man"
|
||||
};
|
||||
case 2:
|
||||
{
|
||||
_side = SAR_AI_friendly_side;
|
||||
_type = "surv";
|
||||
_ai_type = "AI Survivor";
|
||||
_ai_id = "id_SAR_surv_lead"
|
||||
};
|
||||
case 3:
|
||||
{
|
||||
_side = SAR_AI_unfriendly_side;
|
||||
_type = "band";
|
||||
_ai_type = "AI Bandit";
|
||||
_ai_id = "id_SAR_band"
|
||||
};
|
||||
};
|
||||
} else {
|
||||
_error = true;
|
||||
};
|
||||
|
||||
if (_argc > 2) then {
|
||||
_vehicles = _this select 2;
|
||||
} else {
|
||||
diag_log "SAR_AI: Error, you need to define vehicles for this land AI group";
|
||||
_error = true;
|
||||
};
|
||||
|
||||
if (_argc > 3) then {
|
||||
_vehicles_crews = _this select 3;
|
||||
} else {
|
||||
diag_log "SAR_AI: Error, you need to define crews for vehicles for this land AI group";
|
||||
_error = true;
|
||||
};
|
||||
|
||||
if (_argc > 4) then {
|
||||
_respawn = _this select 4;
|
||||
} else {
|
||||
_respawn = false;
|
||||
};
|
||||
|
||||
if (_argc > 5) then {
|
||||
_respawn_time = _this select 5;
|
||||
} else {
|
||||
_respawn_time = SAR_respawn_waittime;
|
||||
};
|
||||
|
||||
{
|
||||
if (_x isKindof "Air" || _x isKindof "Ship") then {
|
||||
diag_log "SAR_AI: Error, you need to define land vehicles only for this land AI group";
|
||||
_error = true;
|
||||
};
|
||||
} foreach _vehicles;
|
||||
|
||||
if(_error) exitWith {diag_log "SAR_AI: Vehicle patrol setup failed, wrong parameters passed!";};
|
||||
|
||||
|
||||
_leaderskills = call compile format ["SAR_leader_%1_skills",_type];
|
||||
_riflemanskills = call compile format ["SAR_soldier_%1_skills",_type];
|
||||
_sniperskills = call compile format ["SAR_sniper_%1_skills",_type];
|
||||
|
||||
// get a random starting position, UPSMON will handle the rest
|
||||
_rndpos = [_patrol_area_name,0,SAR_Blacklist] call UPSMON_pos;
|
||||
|
||||
// create the group
|
||||
_groupvehicles = createGroup _side;
|
||||
|
||||
// create the vehicle and assign crew
|
||||
{
|
||||
// create the vehicle
|
||||
_veh = createVehicle [_x, [_rndpos select 0, _rndpos select 1, 0], [], 0, "CAN_COLLIDE"];
|
||||
_veh setFuel 1;
|
||||
_veh setVariable ["Sarge",1,true];
|
||||
_veh engineon true;
|
||||
|
||||
_veh addMPEventHandler ["HandleDamage", {_this spawn SAR_AI_VEH_HIT;_this select 2;}];
|
||||
|
||||
[_veh] joinSilent _groupvehicles;
|
||||
|
||||
// read the crew definition
|
||||
_veh_setup = _vehicles_crews select _forEachIndex;
|
||||
|
||||
_leaderNPC = call compile format ["SAR_leader_%1_list",_type];
|
||||
|
||||
// vehicle is defined to carry the group leader
|
||||
if((_veh_setup select 0) == 1) then {
|
||||
|
||||
_leader = _groupvehicles createunit [_leaderNPC call BIS_fnc_selectRandom, [(_rndpos select 0) + 10, _rndpos select 1, 0], [], 0.5, "CAN_COLLIDE"];
|
||||
|
||||
_leader_weapon_names = ["leader",_type] call SAR_unit_loadout_weapons;
|
||||
_leader_items = ["leader",_type] call SAR_unit_loadout_items;
|
||||
_leader_tools = ["leader",_type] call SAR_unit_loadout_tools;
|
||||
|
||||
[_leader,_leader_weapon_names,_leader_items,_leader_tools] call SAR_unit_loadout;
|
||||
|
||||
if (_side == SAR_AI_unfriendly_side) then {removeHeadgear _leader; _leader addHeadGear (["H_Shemag_olive","H_Shemag_olive_hs","H_ShemagOpen_khk","H_ShemagOpen_tan"] call BIS_fnc_selectRandom);};
|
||||
|
||||
[_leader] spawn SAR_AI_trace_veh;
|
||||
switch (_grouptype) do
|
||||
{
|
||||
case 1:{_leader setIdentity "id_SAR_sold_man";};
|
||||
case 2:{_leader setIdentity "id_SAR_surv_lead";};
|
||||
case 3:{_leader setIdentity "id_SAR_band";};
|
||||
};
|
||||
[_leader] spawn SAR_AI_reammo;
|
||||
|
||||
_leader addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}];
|
||||
_leader addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}];
|
||||
|
||||
_leader moveInDriver _veh;
|
||||
_leader assignAsDriver _veh;
|
||||
|
||||
[_leader] joinSilent _groupvehicles;
|
||||
|
||||
// set skills of the leader
|
||||
{
|
||||
_leader setskill [_x select 0,(_x select 1 +(floor(random 2) * (_x select 2)))];
|
||||
} foreach _leaderskills;
|
||||
|
||||
// store AI type on the AI
|
||||
_leader setVariable ["SAR_AI_type",_ai_type + " Leader",false];
|
||||
|
||||
// store experience value on AI
|
||||
_leader setVariable ["SAR_AI_experience",0,false];
|
||||
|
||||
// set behaviour & speedmode
|
||||
_leader setspeedmode "FULL";
|
||||
_leader setBehaviour "SAFE";
|
||||
|
||||
};
|
||||
|
||||
_snipers = _veh_setup select 1;
|
||||
_sniperlist = call compile format ["SAR_sniper_%1_list",_type];
|
||||
|
||||
for "_i" from 0 to (_snipers - 1) do
|
||||
{
|
||||
_this = _groupvehicles createunit [_sniperlist call BIS_fnc_selectRandom, [(_rndpos select 0) - 30, _rndpos select 1, 0], [], 0.5, "FORM"];
|
||||
|
||||
_sniper_weapon_names = ["sniper",_type] call SAR_unit_loadout_weapons;
|
||||
_sniper_items = ["sniper",_type] call SAR_unit_loadout_items;
|
||||
_sniper_tools = ["sniper",_type] call SAR_unit_loadout_tools;
|
||||
|
||||
[_this,_sniper_weapon_names,_sniper_items,_sniper_tools] call SAR_unit_loadout;
|
||||
|
||||
if (_side == SAR_AI_unfriendly_side) then {removeHeadgear _this; _this addHeadGear (["H_Shemag_olive","H_Shemag_olive_hs","H_ShemagOpen_khk","H_ShemagOpen_tan"] call BIS_fnc_selectRandom);};
|
||||
|
||||
[_this] spawn SAR_AI_trace_veh;
|
||||
switch (_grouptype) do
|
||||
{
|
||||
case 1:{_this setIdentity "id_SAR_sold_man";};
|
||||
case 2:{_this setIdentity "id_SAR_surv_lead";};
|
||||
case 3:{_this setIdentity "id_SAR_band";};
|
||||
};
|
||||
[_this] spawn SAR_AI_reammo;
|
||||
|
||||
_this addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}];
|
||||
_this addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}];
|
||||
|
||||
[_this] joinSilent _groupvehicles;
|
||||
|
||||
if (isnull (assignedDriver _veh)) then {
|
||||
_this moveInDriver _veh;
|
||||
_this assignAsDriver _veh;
|
||||
} else {
|
||||
//move in vehicle
|
||||
_this moveInCargo _veh;
|
||||
_this assignAsCargo _veh;
|
||||
};
|
||||
|
||||
// set skills
|
||||
{
|
||||
_this setskill [_x select 0,(_x select 1 +(floor(random 2) * (_x select 2)))];
|
||||
} foreach _sniperskills;
|
||||
|
||||
// store AI type on the AI
|
||||
_this setVariable ["SAR_AI_type",_ai_type,false];
|
||||
|
||||
// store experience value on AI
|
||||
_this setVariable ["SAR_AI_experience",0,false];
|
||||
};
|
||||
|
||||
_riflemen = _veh_setup select 2;
|
||||
_riflemenlist = call compile format ["SAR_soldier_%1_list",_type];
|
||||
|
||||
for "_i" from 0 to (_riflemen - 1) do
|
||||
{
|
||||
_this = _groupvehicles createunit [_riflemenlist call BIS_fnc_selectRandom, [(_rndpos select 0) + 30, _rndpos select 1, 0], [], 0.5, "FORM"];
|
||||
|
||||
_soldier_items = ["rifleman",_type] call SAR_unit_loadout_items;
|
||||
_soldier_tools = ["rifleman",_type] call SAR_unit_loadout_tools;
|
||||
_soldier_weapon_names = ["rifleman",_type] call SAR_unit_loadout_weapons;
|
||||
|
||||
[_this,_soldier_weapon_names,_soldier_items,_soldier_tools] call SAR_unit_loadout;
|
||||
|
||||
if (_side == SAR_AI_unfriendly_side) then {removeHeadgear _this; _this addHeadGear (["H_Shemag_olive","H_Shemag_olive_hs","H_ShemagOpen_khk","H_ShemagOpen_tan"] call BIS_fnc_selectRandom);};
|
||||
|
||||
[_this] spawn SAR_AI_trace_veh;
|
||||
switch (_grouptype) do
|
||||
{
|
||||
case 1:{_this setIdentity "id_SAR_sold_man";};
|
||||
case 2:{_this setIdentity "id_SAR_surv_lead";};
|
||||
case 3:{_this setIdentity "id_SAR_band";};
|
||||
};
|
||||
[_this] spawn SAR_AI_reammo;
|
||||
|
||||
_this addMPEventHandler ["MPkilled", {Null = _this spawn SAR_AI_killed;}];
|
||||
_this addMPEventHandler ["MPHit", {Null = _this spawn SAR_AI_hit;}];
|
||||
|
||||
[_this] joinSilent _groupvehicles;
|
||||
|
||||
// move in vehicle
|
||||
_this moveInCargo _veh;
|
||||
_this assignAsCargo _veh;
|
||||
|
||||
// set skills
|
||||
{
|
||||
_this setskill [_x select 0,(_x select 1 +(floor(random 2) * (_x select 2)))];
|
||||
} foreach _riflemanskills;
|
||||
|
||||
// store AI type on the AI
|
||||
_this setVariable ["SAR_AI_type",_ai_type,false];
|
||||
|
||||
// store experience value on AI
|
||||
_this setVariable ["SAR_AI_experience",0,false];
|
||||
};
|
||||
} foreach _vehicles;
|
||||
|
||||
// initialize upsmon for the group
|
||||
_ups_para_list = [_leader,_patrol_area_name,'ONROAD','NOFOLLOW','SAFE','SPAWNED','DELETE:',SAR_DELETE_TIMEOUT];
|
||||
|
||||
if (_respawn) then {
|
||||
_ups_para_list pushBack ['RESPAWN'];
|
||||
_ups_para_list pushBack ['RESPAWNTIME:'];
|
||||
_ups_para_list pushBack [_respawn_time];
|
||||
};
|
||||
|
||||
if(SAR_AI_disable_UPSMON_AI) then {
|
||||
_ups_para_list pushBack ['NOAI'];
|
||||
};
|
||||
|
||||
_ups_para_list spawn UPSMON;
|
||||
|
||||
if(SAR_DEBUG) then {
|
||||
diag_log format["Sarge's AI System: Land vehicle group (%2), side %3 spawned in %1 in a %4, side %5.",_patrol_area_name,_groupvehicles, _side, typeOf _veh, side _veh];
|
||||
};
|
||||
|
||||
if (SAR_HC) then {
|
||||
{
|
||||
_hcID = getPlayerUID _x;
|
||||
if(_hcID select [0,2] isEqualTo 'HC')then {
|
||||
_SAIS_HC = _group setGroupOwner (owner _x);
|
||||
if (_SAIS_HC) then {
|
||||
if (SAR_DEBUG) then {
|
||||
diag_log format ["Sarge's AI System: Now moving group %1 to Headless Client %2",_group,_hcID];
|
||||
};
|
||||
} else {
|
||||
if (SAR_DEBUG) then {
|
||||
diag_log format ["Sarge's AI System: ERROR! Moving group %1 to Headless Client %2 has failed!",_group,_hcID];
|
||||
};
|
||||
};
|
||||
};
|
||||
} forEach allPlayers;
|
||||
};
|
||||
|
||||
_groupvehicles;
|
@ -1,69 +0,0 @@
|
||||
/*
|
||||
# Original #
|
||||
Sarge AI System 1.5
|
||||
Created for Arma 2: DayZ Mod
|
||||
Author: Sarge
|
||||
https://github.com/Swiss-Sarge
|
||||
|
||||
# Fork #
|
||||
Sarge AI System 2.0+
|
||||
Modded for Arma 3: Exile Mod
|
||||
Changes: Dango
|
||||
https://www.hod-servers.com
|
||||
|
||||
*/
|
||||
private ["_baseOwner","_attackAll","_friendlyPlayers","_ai","_entity_array"];
|
||||
|
||||
if (isServer OR !hasInterface) exitWith {}; // Do not execute on server or any headless client(s)
|
||||
|
||||
_ai = _this select 0;
|
||||
|
||||
_friendlyPlayers = _ai getVariable ["SAR_FLAG_FRIENDLY", []];
|
||||
_attackAll = _ai getVariable ["ATTACK_ALL", true];
|
||||
|
||||
_baseOwner = 0;
|
||||
|
||||
while {alive _ai || !isNull _ai} do {
|
||||
_friendlyPlayers = _ai getVariable ["SAR_FLAG_FRIENDLY", []];
|
||||
_attackAll = _ai getVariable ["ATTACK_ALL", false];
|
||||
_entity_array = (getPosATL _ai) nearEntities [["CAManBase","Air","Car","Motorcycle","Tank"],SAR_DETECT_HOSTILE + 200];
|
||||
|
||||
if (SAR_EXTREME_DEBUG) then {
|
||||
diag_log format ["Sarge AI System: Territory patrol gaurds ready. Friendly base UID array is: %1",_friendlyPlayers];
|
||||
};
|
||||
|
||||
if (_attackAll) then {
|
||||
{
|
||||
if (isPlayer _x) then {
|
||||
_baseOwner = 0;
|
||||
if (_baseOwner == 0) then {
|
||||
if ((getPlayerUID _x) in _friendlyPlayers) then {
|
||||
_x addrating 50000;
|
||||
_x setVariable ["BaseOwner", 1, true];
|
||||
if (SAR_EXTREME_DEBUG) then {
|
||||
diag_log format ["Sarge AI System: Rating has been adjusted for authorized player with UID %1",(getPlayerUID _x)];
|
||||
};
|
||||
} else {
|
||||
_x addrating -50000;
|
||||
if (SAR_EXTREME_DEBUG) then {
|
||||
diag_log format ["Sarge AI System: Rating has been adjusted for unauthorized player with UID %1",(getPlayerUID _x)];
|
||||
};
|
||||
};
|
||||
} else {
|
||||
if (_baseOwner == 1 && rating _x < 50000) then {
|
||||
_x addrating 50000;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
_tFriendlyPlayers = _x getVariable ["SAR_FLAG_FRIENDLY", []];
|
||||
_result = [_tFriendlyPlayers, _friendlyPlayers] call BIS_fnc_arrayCompare;
|
||||
if (_result) then {
|
||||
_x addrating 50000;
|
||||
} else {
|
||||
_x addrating -50000;
|
||||
};
|
||||
};
|
||||
} forEach _entity_array;
|
||||
};
|
||||
sleep 5;
|
||||
};
|
@ -1,49 +0,0 @@
|
||||
/*
|
||||
# Original #
|
||||
Sarge AI System 1.5
|
||||
Created for Arma 2: DayZ Mod
|
||||
Author: Sarge
|
||||
https://github.com/Swiss-Sarge
|
||||
|
||||
# Fork #
|
||||
Sarge AI System 2.0+
|
||||
Modded for Arma 3: Exile Mod
|
||||
Changes: Dango
|
||||
http://www.hod-servers.com
|
||||
|
||||
*/
|
||||
private ["_ai","_entity_array","_sleeptime","_detectrange"];
|
||||
|
||||
if (isServer && !hasInterface) exitWith {}; // Do not execute on server or any headless client(s)
|
||||
|
||||
_ai = _this select 0;
|
||||
|
||||
_detectrange = SAR_DETECT_HOSTILE;
|
||||
_respectlimit = SAR_RESPECT_HOSTILE_LIMIT;
|
||||
_sleeptime = SAR_DETECT_INTERVAL;
|
||||
|
||||
while {alive _ai} do {
|
||||
_entity_array = (position _ai) nearEntities ["CAManBase",_detectrange];
|
||||
{
|
||||
if(vehicle _ai == _ai) then { // AI is not in a vehicle, so we trace Zeds
|
||||
if (_x isKindof "civilclass") then {
|
||||
if(rating _x > -10000) then {
|
||||
_x addrating -10000;
|
||||
if(SAR_EXTREME_DEBUG) then {
|
||||
diag_log "SAR EXTREME DEBUG: Zombie rated down";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
if(isPlayer _x && {vehicle _x == _x}) then { // only do this for players not in vehicles
|
||||
_respect = _x getVariable ["ExileScore",0];
|
||||
If (_respect < _respectlimit && {rating _x > -10000}) then {
|
||||
if(SAR_EXTREME_DEBUG) then {
|
||||
diag_log format["SAR EXTREME DEBUG: reducing rating (trace_entities) for player: %1", _x];
|
||||
};
|
||||
_x addrating -10000;
|
||||
};
|
||||
};
|
||||
} forEach _entity_array;
|
||||
sleep _sleeptime;
|
||||
};
|
@ -1,54 +0,0 @@
|
||||
/*
|
||||
# Original #
|
||||
Sarge AI System 1.5
|
||||
Created for Arma 2: DayZ Mod
|
||||
Author: Sarge
|
||||
https://github.com/Swiss-Sarge
|
||||
|
||||
# Fork #
|
||||
Sarge AI System 2.0+
|
||||
Modded for Arma 3: Exile Mod
|
||||
Changes: Dango
|
||||
https://www.hod-servers.com
|
||||
|
||||
*/
|
||||
private ["_ai","_entity_array","_humanity","_humanitylimit","_sleeptime","_detectrange","_tracewhat","_player_rating","_clientmachine"];
|
||||
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
_ai = _this select 0;
|
||||
_tracewhat = "CAManBase";
|
||||
|
||||
_detectrange = SAR_DETECT_HOSTILE_FROM_VEHICLE;
|
||||
_respectlimit = SAR_RESPECT_HOSTILE_LIMIT;
|
||||
_sleeptime = SAR_DETECT_FROM_VEHICLE_INTERVAL;
|
||||
|
||||
while {alive _ai} do {
|
||||
_entity_array = (position _ai) nearEntities [_tracewhat, _detectrange];
|
||||
{
|
||||
if(isPlayer _x && {vehicle _x == _x}) then { // only do that for players that are not in a vehicle
|
||||
|
||||
_player_rating = rating _x;
|
||||
_respect = _x getVariable ["ExileScore",0];
|
||||
If (_respect < _respectlimit && {_player_rating > -10000}) then {
|
||||
|
||||
if(SAR_EXTREME_DEBUG) then {
|
||||
diag_log format["SAR EXTREME DEBUG: reducing rating (trace_from_vehicle) for player: %1", _x];
|
||||
};
|
||||
|
||||
//define global variable
|
||||
adjustrating = [_x,(0 - (10000+_player_rating))];
|
||||
|
||||
// get the players machine ID
|
||||
_clientmachine = owner _x;
|
||||
|
||||
// transmit the global variable to this client machine
|
||||
_clientmachine publicVariableClient "adjustrating";
|
||||
|
||||
// reveal player to vehicle group
|
||||
_ai reveal [_x,4];
|
||||
};
|
||||
};
|
||||
} forEach _entity_array;
|
||||
sleep _sleeptime;
|
||||
};
|
@ -1,33 +0,0 @@
|
||||
// =========================================================================================================
|
||||
// SAR_AI - DayZ AI library
|
||||
// Version: 1.0.0
|
||||
// Author: Sarge (sarge@krumeich.ch)
|
||||
//
|
||||
// Wiki: to come
|
||||
// Forum: to come
|
||||
//
|
||||
// ---------------------------------------------------------------------------------------------------------
|
||||
// Required:
|
||||
// UPSMon
|
||||
// SHK_pos
|
||||
//
|
||||
// ---------------------------------------------------------------------------------------------------------
|
||||
// grid cfg file for Chernarus
|
||||
// last modified: 5.3.2013
|
||||
// ---------------------------------------------------------------------------------------------------------
|
||||
|
||||
// x coordinate of the first, bottom left grid center point
|
||||
_startx=2500;
|
||||
|
||||
|
||||
// y coordinate of the first, bottom left grid center point
|
||||
_starty=8000;
|
||||
|
||||
// gridsize x (how many single squares in the grid) for the x-axis
|
||||
_gridsize_x=14;
|
||||
|
||||
// gridsize y (how many single squares in the grid) for the y-axis
|
||||
_gridsize_y=9;
|
||||
|
||||
// distance from the center of one square of the grid to the border of that square. so overall size of a square in the grid is 2x gridwidth / 2x gridwidth
|
||||
_gridwidth = 1000;
|
@ -1,33 +0,0 @@
|
||||
// =========================================================================================================
|
||||
// SAR_AI - DayZ AI library
|
||||
// Version: 1.0.0
|
||||
// Author: Sarge (sarge@krumeich.ch)
|
||||
//
|
||||
// Wiki: to come
|
||||
// Forum: to come
|
||||
//
|
||||
// ---------------------------------------------------------------------------------------------------------
|
||||
// Required:
|
||||
// UPSMon
|
||||
// SHK_pos
|
||||
//
|
||||
// ---------------------------------------------------------------------------------------------------------
|
||||
// grid cfg file for Chernarus
|
||||
// last modified: 5.3.2013
|
||||
// ---------------------------------------------------------------------------------------------------------
|
||||
|
||||
// x coordinate of the first, bottom left grid center point
|
||||
_startx=2500;
|
||||
|
||||
|
||||
// y coordinate of the first, bottom left grid center point
|
||||
_starty=2800;
|
||||
|
||||
// gridsize x (how many single squares in the grid) for the x-axis
|
||||
_gridsize_x=6;
|
||||
|
||||
// gridsize y (how many single squares in the grid) for the y-axis
|
||||
_gridsize_y=6;
|
||||
|
||||
// distance from the center of one square of the grid to the border of that square. so overall size of a square in the grid is 2x gridwidth / 2x gridwidth
|
||||
_gridwidth = 1000;
|
@ -1,32 +0,0 @@
|
||||
// =========================================================================================================
|
||||
// SAR_AI - DayZ AI library
|
||||
// Version: 1.0.0
|
||||
// Author: Sarge (sarge@krumeich.ch)
|
||||
//
|
||||
// Wiki: to come
|
||||
// Forum: to come
|
||||
//
|
||||
// ---------------------------------------------------------------------------------------------------------
|
||||
// Required:
|
||||
// UPSMon
|
||||
// SHK_pos
|
||||
//
|
||||
// ---------------------------------------------------------------------------------------------------------
|
||||
// grid cfg file for Fallujah
|
||||
// last modified: 5.3.2013
|
||||
// ---------------------------------------------------------------------------------------------------------
|
||||
|
||||
// x coordinate of the first, bottom left grid center point
|
||||
_startx=2500;
|
||||
|
||||
// y coordinate of the first, bottom left grid center point
|
||||
_starty=2800;
|
||||
|
||||
// gridsize x (how many single squares in the grid) for the x-axis
|
||||
_gridsize_x=6;
|
||||
|
||||
// gridsize y (how many single squares in the grid) for the y-axis
|
||||
_gridsize_y=6;
|
||||
|
||||
// distance from the center of one square of the grid to the border of that square. so overall size of a square in the grid is 2x gridwidth / 2x gridwidth
|
||||
_gridwidth = 1000;
|
@ -1,32 +0,0 @@
|
||||
// =========================================================================================================
|
||||
// SAR_AI - DayZ AI library
|
||||
// Version: 1.0.0
|
||||
// Author: Sarge (sarge@krumeich.ch)
|
||||
//
|
||||
// Wiki: to come
|
||||
// Forum: to come
|
||||
//
|
||||
// ---------------------------------------------------------------------------------------------------------
|
||||
// Required:
|
||||
// UPSMon
|
||||
// SHK_pos
|
||||
//
|
||||
// ---------------------------------------------------------------------------------------------------------
|
||||
// grid cfg file for Lingor by Wyqer
|
||||
// last modified: 5.3.2013
|
||||
// ---------------------------------------------------------------------------------------------------------
|
||||
|
||||
// x coordinate of the first, bottom left grid center point
|
||||
_startx=1000;
|
||||
|
||||
// y coordinate of the first, bottom left grid center point
|
||||
_starty=1000;
|
||||
|
||||
// gridsize x (how many single squares in the grid) for the x-axis
|
||||
_gridsize_x=6;
|
||||
|
||||
// gridsize y (how many single squares in the grid) for the y-axis
|
||||
_gridsize_y=6;
|
||||
|
||||
// distance from the center of one square of the grid to the border of that square. so overall size of a square in the grid is 2x gridwidth / 2x gridwidth
|
||||
_gridwidth = 750;
|
@ -1,32 +0,0 @@
|
||||
// =========================================================================================================
|
||||
// SAR_AI - DayZ AI library
|
||||
// Version: 1.0.0
|
||||
// Author: Sarge (sarge@krumeich.ch)
|
||||
//
|
||||
// Wiki: to come
|
||||
// Forum: to come
|
||||
//
|
||||
// ---------------------------------------------------------------------------------------------------------
|
||||
// Required:
|
||||
// UPSMon
|
||||
// SHK_pos
|
||||
//
|
||||
// ---------------------------------------------------------------------------------------------------------
|
||||
// grid cfg file for Celle
|
||||
// last modified: 5.3.2013
|
||||
// ---------------------------------------------------------------------------------------------------------
|
||||
|
||||
// x coordinate of the first, bottom left grid center point
|
||||
_startx=2500;
|
||||
|
||||
// y coordinate of the first, bottom left grid center point
|
||||
_starty=2800;
|
||||
|
||||
// gridsize x (how many single squares in the grid) for the x-axis
|
||||
_gridsize_x=5;
|
||||
|
||||
// gridsize y (how many single squares in the grid) for the y-axis
|
||||
_gridsize_y=5;
|
||||
|
||||
// distance from the center of one square of the grid to the border of that square. so overall size of a square in the grid is 2x gridwidth / 2x gridwidth
|
||||
_gridwidth = 650;
|
@ -1,32 +0,0 @@
|
||||
// =========================================================================================================
|
||||
// SAR_AI - DayZ AI library
|
||||
// Version: 1.0.0
|
||||
// Author: Sarge (sarge@krumeich.ch)
|
||||
//
|
||||
// Wiki: to come
|
||||
// Forum: to come
|
||||
//
|
||||
// ---------------------------------------------------------------------------------------------------------
|
||||
// Required:
|
||||
// UPSMon
|
||||
// SHK_pos
|
||||
//
|
||||
// ---------------------------------------------------------------------------------------------------------
|
||||
// grid cfg file for Namalsk
|
||||
// last modified: 5.3.2013
|
||||
// ---------------------------------------------------------------------------------------------------------
|
||||
|
||||
// x coordinate of the first, bottom left grid center point
|
||||
_startx=2900;
|
||||
|
||||
// y coordinate of the first, bottom left grid center point
|
||||
_starty=5600;
|
||||
|
||||
// gridsize x (how many single squares in the grid) for the x-axis
|
||||
_gridsize_x=4;
|
||||
|
||||
// gridsize y (how many single squares in the grid) for the y-axis
|
||||
_gridsize_y=4;
|
||||
|
||||
// distance from the center of one square of the grid to the border of that square. so overall size of a square in the grid is 2x gridwidth / 2x gridwidth
|
||||
_gridwidth = 900;
|
@ -1,32 +0,0 @@
|
||||
// =========================================================================================================
|
||||
// SAR_AI - DayZ AI library
|
||||
// Version: 1.0.0
|
||||
// Author: Sarge (sarge@krumeich.ch)
|
||||
//
|
||||
// Wiki: to come
|
||||
// Forum: to come
|
||||
//
|
||||
// ---------------------------------------------------------------------------------------------------------
|
||||
// Required:
|
||||
// UPSMon
|
||||
// SHK_pos
|
||||
//
|
||||
// ---------------------------------------------------------------------------------------------------------
|
||||
// grid cfg file for Panthera
|
||||
// last modified: 5.3.2013
|
||||
// ---------------------------------------------------------------------------------------------------------
|
||||
|
||||
// x coordinate of the first, bottom left grid center point
|
||||
_startx=2500;
|
||||
|
||||
// y coordinate of the first, bottom left grid center point
|
||||
_starty=2800;
|
||||
|
||||
// gridsize x (how many single squares in the grid) for the x-axis
|
||||
_gridsize_x=6;
|
||||
|
||||
// gridsize y (how many single squares in the grid) for the y-axis
|
||||
_gridsize_y=6;
|
||||
|
||||
// distance from the center of one square of the grid to the border of that square. so overall size of a square in the grid is 2x gridwidth / 2x gridwidth
|
||||
_gridwidth = 1000;
|
@ -1,32 +0,0 @@
|
||||
// =========================================================================================================
|
||||
// SAR_AI - DayZ AI library
|
||||
// Version: 1.0.0
|
||||
// Author: Sarge (sarge@krumeich.ch)
|
||||
//
|
||||
// Wiki: to come
|
||||
// Forum: to come
|
||||
//
|
||||
// ---------------------------------------------------------------------------------------------------------
|
||||
// Required:
|
||||
// UPSMon
|
||||
// SHK_pos
|
||||
//
|
||||
// ---------------------------------------------------------------------------------------------------------
|
||||
// grid cfg file for Takistan
|
||||
// last modified: 5.3.2013
|
||||
// ---------------------------------------------------------------------------------------------------------
|
||||
|
||||
// x coordinate of the first, bottom left grid center point
|
||||
_startx=2500;
|
||||
|
||||
// y coordinate of the first, bottom left grid center point
|
||||
_starty=2800;
|
||||
|
||||
// gridsize x (how many single squares in the grid) for the x-axis
|
||||
_gridsize_x=6;
|
||||
|
||||
// gridsize y (how many single squares in the grid) for the y-axis
|
||||
_gridsize_y=6;
|
||||
|
||||
// distance from the center of one square of the grid to the border of that square. so overall size of a square in the grid is 2x gridwidth / 2x gridwidth
|
||||
_gridwidth = 1000;
|
@ -1,32 +0,0 @@
|
||||
// =========================================================================================================
|
||||
// SAR_AI - DayZ AI library
|
||||
// Version: 1.0.0
|
||||
// Author: Sarge (sarge@krumeich.ch)
|
||||
//
|
||||
// Wiki: to come
|
||||
// Forum: to come
|
||||
//
|
||||
// ---------------------------------------------------------------------------------------------------------
|
||||
// Required:
|
||||
// UPSMon
|
||||
// SHK_pos
|
||||
//
|
||||
// ---------------------------------------------------------------------------------------------------------
|
||||
// grid cfg file for Tanoa by Wyqer
|
||||
// last modified: 15.07.2016
|
||||
// ---------------------------------------------------------------------------------------------------------
|
||||
|
||||
// x coordinate of the first, bottom left grid center point
|
||||
_startx=1600;
|
||||
|
||||
// y coordinate of the first, bottom left grid center point
|
||||
_starty=1600;
|
||||
|
||||
// gridsize x (how many single squares in the grid) for the x-axis
|
||||
_gridsize_x=10;
|
||||
|
||||
// gridsize y (how many single squares in the grid) for the y-axis
|
||||
_gridsize_y=10;
|
||||
|
||||
// distance from the center of one square of the grid to the border of that square. so overall size of a square in the grid is 2x gridwidth / 2x gridwidth
|
||||
_gridwidth = 600;
|
@ -1,32 +0,0 @@
|
||||
// =========================================================================================================
|
||||
// SAR_AI - DayZ AI library
|
||||
// Version: 1.0.0
|
||||
// Author: Sarge (sarge@krumeich.ch)
|
||||
//
|
||||
// Wiki: to come
|
||||
// Forum: to come
|
||||
//
|
||||
// ---------------------------------------------------------------------------------------------------------
|
||||
// Required:
|
||||
// UPSMon
|
||||
// SHK_pos
|
||||
//
|
||||
// ---------------------------------------------------------------------------------------------------------
|
||||
// grid cfg file for Taviana
|
||||
// last modified: 5.3.2013
|
||||
// ---------------------------------------------------------------------------------------------------------
|
||||
|
||||
// x coordinate of the first, bottom left grid center point
|
||||
_startx=2500;
|
||||
|
||||
// y coordinate of the first, bottom left grid center point
|
||||
_starty=1500;
|
||||
|
||||
// gridsize x (how many single squares in the grid) for the x-axis
|
||||
_gridsize_x=6;
|
||||
|
||||
// gridsize y (how many single squares in the grid) for the y-axis
|
||||
_gridsize_y=7;
|
||||
|
||||
// distance from the center of one square of the grid to the border of that square. so overall size of a square in the grid is 2x gridwidth / 2x gridwidth
|
||||
_gridwidth = 1500;
|
@ -1,288 +0,0 @@
|
||||
/*
|
||||
IMPORTANT: The grid squares are named like : SAR_area_0_0
|
||||
|
||||
where the first 0 is the x counter, and the second 0 the y counter.
|
||||
|
||||
So to adress the bottom left square in the grid, you use SAR_area_0_0.
|
||||
The square above that one would be: SAR_area_0_1
|
||||
the square one to the right of the bottom left square is SAR_area_1_0
|
||||
|
||||
You want to change the number arrays in the below lines:
|
||||
|
||||
The order for these numbers is always [BANDIT, SURVIVOR, SOLDIER]
|
||||
|
||||
Lets take an example for Chernarus
|
||||
|
||||
// Kamenka, 0 bandit groups, 1 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,1,2],[0,75,100],[0,4,3]],"SAR_area_0_0"] call SAR_AI_mon_upd;
|
||||
|
||||
[[0,1,2],[0,75,100],[0,4,3]]
|
||||
|
||||
the first set of numbers : 0,1,2
|
||||
stands for
|
||||
0 bandit groups
|
||||
1 soldier group
|
||||
2 surivors groups
|
||||
thats the max that can spawn in this grid
|
||||
|
||||
the second set of numbers : 0,75,100
|
||||
that means:
|
||||
0% probability to spawn bandit groups
|
||||
75% for soldiers
|
||||
100% for survivors
|
||||
|
||||
the last set of numbers : 0,4,3
|
||||
thats the maximum number of ppl in the group (plus 1 leader)
|
||||
0 bandits
|
||||
max 4 (+1 leader) soldiers
|
||||
max 3 (+1 leader) survivors
|
||||
this number is randomized
|
||||
*/
|
||||
|
||||
_type = _this select 0;
|
||||
|
||||
// grid definition for the automatic spawn system
|
||||
if ((_type == "dynamic") && SAR_dynamic_spawning) then {
|
||||
|
||||
diag_log format["SAR_AI: Dynamic spawning definition / adjustments started"];
|
||||
|
||||
// Blacklist Safezones using 0s
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_0_5"] call SAR_AI_mon_upd;// Top left safezone
|
||||
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_6_4"] call SAR_AI_mon_upd;// Airbase safezone
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_6_5"] call SAR_AI_mon_upd;
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_7_4"] call SAR_AI_mon_upd;
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_7_5"] call SAR_AI_mon_upd;
|
||||
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_10_8"] call SAR_AI_mon_upd;// Top right safezone
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_11_8"] call SAR_AI_mon_upd;
|
||||
|
||||
|
||||
diag_log format["SAR_AI: Dynamic spawning definition / adjustments finished"];
|
||||
};
|
||||
|
||||
if (_type == "static") then {
|
||||
// Definition of area markers for static spawns
|
||||
diag_log format["SAR_AI: Static spawning area definition started"];
|
||||
|
||||
// soutcoast, heli patrol area
|
||||
_this = createMarker ["SAR_marker_helipatrol_southcoast", [7997.2837, 2687.6707]];
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [6500, 1200];
|
||||
SAR_marker_helipatrol_southcoast = _this;
|
||||
|
||||
// eastcoast, heli patrol area
|
||||
_this = createMarker ["SAR_marker_helipatrol_eastcoast", [13304.196, 8220.9795]];
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [1200, 6000];
|
||||
SAR_marker_helipatrol_eastcoast = _this;
|
||||
|
||||
// NWAF, heli patrol area
|
||||
_this = createMarker ["SAR_marker_helipatrol_nwaf", [4525.3335, 10292.299]];
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [1500, 500];
|
||||
_this setMarkerDir 59.354115;
|
||||
SAR_marker_helipatrol_nwaf = _this;
|
||||
|
||||
// NEAF, heli patrol area
|
||||
_this = createMarker ["SAR_marker_helipatrol_neaf", [12034.16, 12725.376, 0]];
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [1000, 600];
|
||||
SAR_marker_helipatrol_neaf = _this;
|
||||
|
||||
|
||||
_this = createMarker ["SAR_marker_DEBUG_veh", [11514.385,11679.752]];
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 1000];
|
||||
_this setMarkerDir -19.085985;
|
||||
SAR_marker_DEBUG_veh = _this;
|
||||
|
||||
_this = createMarker ["SAR_marker_DEBUG_devilscastle", [6913.47,11437.2,0.001]];
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [10, 10];
|
||||
SAR_marker_DEBUG_devilscastle = _this;
|
||||
|
||||
diag_log format["SAR_AI: Static spawning area definition finished"];
|
||||
// ----------------------------------------------------------------------------------------
|
||||
// End of area marker definition section
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// Static, predefined heli patrol areas with configurable units
|
||||
//---------------------------------------------------------------------------------
|
||||
//
|
||||
// format: [areamarker,type_of_group,(respawn),(respawntime)] call SAR_AI;
|
||||
//
|
||||
// areamarker : Name of an area, as defined in your area definitions (MUST NOT BE similar to SAR_area_ ! THIS IS IMPORTANT!)
|
||||
// type_of_group : 1 = military, 2 = survivors, 3 = bandits
|
||||
//
|
||||
// respawn : true or false (optional)
|
||||
// respawntime : time in secs until group respawns (optional)
|
||||
// air_vehicle_type : classnema of the air vehicle you want to use
|
||||
//
|
||||
//
|
||||
// Note: The crew will be automatically seized to man any available gun in the airplane / heli.
|
||||
//
|
||||
// Examples:
|
||||
//
|
||||
// A) military air group patrolling, respawning, respawn time = default configured time, using default randomized vehicles
|
||||
//
|
||||
// [SAR_marker_DEBUG,1,true] call SAR_AI_heli;
|
||||
//
|
||||
// B) bandit air group patrolling, not respawning,
|
||||
//
|
||||
// [SAR_marker_DEBUG,3] call SAR_AI_heli;
|
||||
//
|
||||
// C) survivor air group patrolling, respawning, respawn time = 120 seconds
|
||||
//
|
||||
// [SAR_marker_DEBUG,true,120] call SAR_AI_heli;
|
||||
//
|
||||
//---------------------------------------------------------------------------------
|
||||
diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"];
|
||||
|
||||
// define your static air patrols here
|
||||
/*
|
||||
//Heli Patrol NWAF
|
||||
[SAR_marker_DEBUG_veh,1,true] call SAR_AI_heli;
|
||||
|
||||
//Heli Patrol NEAF
|
||||
[SAR_marker_DEBUG_veh,1,true] call SAR_AI_heli;
|
||||
|
||||
// Heli patrol south coast
|
||||
[SAR_marker_DEBUG_veh,1,true] call SAR_AI_heli;
|
||||
[SAR_marker_DEBUG_veh,1,true] call SAR_AI_heli;
|
||||
|
||||
// heli patrol east coast
|
||||
[SAR_marker_DEBUG_veh,1,true] call SAR_AI_heli;
|
||||
[SAR_marker_DEBUG_veh,1,true] call SAR_AI_heli;
|
||||
|
||||
// example war scenario in the northwest. Comment OUT after having had a look at it!
|
||||
[SAR_marker_DEBUG_veh,1,true,30] call SAR_AI_heli;
|
||||
[SAR_marker_DEBUG_veh,1,true,30] call SAR_AI_heli;
|
||||
[SAR_marker_DEBUG_veh,3,true,30] call SAR_AI_heli;
|
||||
[SAR_marker_DEBUG_veh,3,true,30] call SAR_AI_heli;
|
||||
*/
|
||||
|
||||
diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
|
||||
//---------------------------------------------------------------------------------
|
||||
// Static, predefined infantry patrols in defined areas with configurable units
|
||||
//---------------------------------------------------------------------------------
|
||||
//
|
||||
// format: [areamarker,type_of_group,number_of_snipers,number_of_riflemen,action_to_do,(respawn),(respawntime)] call SAR_AI;
|
||||
//
|
||||
// areamarker : Name of an area, as defined in your area definitions (MUST NOT BE similar to SAR_area_ ! THIS IS IMPORTANT!)
|
||||
// type_of_group : 1 = military, 2 = survivors, 3 = bandits
|
||||
// number_of_snipers : amount of snipers in the group
|
||||
// number_of_riflemen : amount of riflemen in the group
|
||||
//
|
||||
// action_to_do : groupaction (optional, default is "patrol")
|
||||
// possible values:
|
||||
// "fortify" -> the group will search for nearby buildings and move in them. They will stay there until an enemy spotted, then they will chase him.
|
||||
// "ambush" -> the group will look for a nearby road, and setup an ambush. They will not move until an enemy was spotted.
|
||||
// "patrol" -> the group will patrol random waypoints in the area, and engage any enemy they see.
|
||||
//
|
||||
// respawn : true or false (optional)
|
||||
// respawntime : time in secs until group respawns (optional)
|
||||
//
|
||||
// Examples:
|
||||
//
|
||||
// A) military group patrolling, with 1 leader and 1 rifleman, respawning, respawn time = default configured time
|
||||
//
|
||||
// [SAR_marker_DEBUG,1,0,1,"patrol",true] call SAR_AI;
|
||||
//
|
||||
// B) bandit group patrolling, with 1 leader, 2 snipers and 1 rifleman, respawning, respawn time = 30 seconds
|
||||
//
|
||||
// [SAR_marker_DEBUG,3,2,1,"patrol",true,30] call SAR_AI;
|
||||
//
|
||||
// C) survivor group fortifying, with 1 leader, 1 sniper and 3 riflemen, not respawning
|
||||
//
|
||||
// [SAR_marker_DEBUG,2,1,3,"fortify",false] call SAR_AI;
|
||||
//
|
||||
//---------------------------------------------------------------------------------
|
||||
diag_log format["SAR_AI: Static Spawning for infantry patrols started"];
|
||||
|
||||
// define your static infantry patrols here
|
||||
|
||||
/* [SAR_marker_DEBUG_devilscastle,1,0,6,"fortify",true] call SAR_AI; */
|
||||
|
||||
// example war scenario in the northwest. Comment OUT after having had a look at it!
|
||||
/* [SAR_marker_DEBUG_veh,1,0,9,"patrol",true] call SAR_AI;
|
||||
[SAR_marker_DEBUG_veh,2,0,9,"patrol",true] call SAR_AI;
|
||||
[SAR_marker_DEBUG_veh,3,0,9,"patrol",true] call SAR_AI;
|
||||
[SAR_marker_DEBUG_veh,3,0,9,"patrol",true] call SAR_AI; */
|
||||
|
||||
diag_log format["SAR_AI: Static Spawning for infantry patrols finished"];
|
||||
// -------------------------------------------------------------------------------------
|
||||
//
|
||||
// Static spawns for vehicle groups
|
||||
//
|
||||
// format: [areamarker,type_of_group,vehicle array,crew array,(respawn),(respawntime)] call SAR_AI_land;
|
||||
//
|
||||
//
|
||||
// areamarker : Name of an area, as defined in your area definitions
|
||||
// type_of_group : 1 = military, 2 = survivors, 3 = bandits
|
||||
// vehicle array : e.g. ["car1"], MUST be enclosed by [], and MUST be valid vehicle classnames. multiple vehicles are possible, like this: ["car1","car1","car1"]
|
||||
// crew array : e.g. [[1,2,3]] -> the first entry in the array element sets if the leader travels in that vehicle, the second is the number of snipers in the vehicle, the third is the number of riflemen.
|
||||
// must match to the number of defined vehicles, so for the above example, you need: [[1,2,3],[0,1,2],[0,1,1]]
|
||||
//
|
||||
//
|
||||
// respawn : true or false (optional)
|
||||
// respawntime : time in secs until group respawns (optional)
|
||||
//
|
||||
//
|
||||
//
|
||||
// Examples:
|
||||
//
|
||||
// A) This will spawn an AI group with 1 vehicle(UAZ), and 3 AI in it
|
||||
/*
|
||||
[
|
||||
SAR_marker_DEBUG_veh_1, // Name of the area that the vehicle patrol will spawn in
|
||||
1, // type of group
|
||||
["UAZ_Unarmed_TK_EP1"], // used vehicles
|
||||
[[1,1,1]], // Vehicle initial crew
|
||||
false // if this group should respawn or not
|
||||
] call SAR_AI_land;
|
||||
*/
|
||||
//
|
||||
// B) This will spawn an AI group with 1 vehicle, 3 AI in the UAZ, and this group will respawn after 60 seconds
|
||||
/*
|
||||
[
|
||||
SAR_marker_DEBUG_veh_1, // Name of the area that the vehicle patrol will spawn in
|
||||
1, // type of group
|
||||
["UAZ_Unarmed_TK_EP1"], // used vehicle
|
||||
[[1,1,1]], // Vehicle initial crews
|
||||
true, // if this group should respawn or not
|
||||
60 // waittime until this group will respawn
|
||||
] call SAR_AI_land;
|
||||
*/
|
||||
//
|
||||
// -------------------------------------------------------------------------------------
|
||||
diag_log format["SAR_AI: Static Spawning for vehicle patrols started"];
|
||||
|
||||
// define your static vehicle patrols here
|
||||
/* [SAR_marker_DEBUG_veh,1,["SUV_Base"],[[1,1,1]],true,60] call SAR_AI_land;
|
||||
[SAR_marker_DEBUG_veh,2,["SUV_Base"],[[1,1,1]],true,60] call SAR_AI_land;
|
||||
[SAR_marker_DEBUG_veh,3,["SUV_Base"],[[1,1,1]],true,60] call SAR_AI_land; */
|
||||
|
||||
diag_log format["SAR_AI: Static Spawning for vehicle patrols finished"];
|
||||
// ---- end of configuration area ----
|
||||
};
|
@ -1,384 +0,0 @@
|
||||
/*
|
||||
IMPORTANT: The grid squares are named like : SAR_area_0_0
|
||||
|
||||
where the first 0 is the x counter, and the second 0 the y counter.
|
||||
|
||||
So to adress the bottom left square in the grid, you use SAR_area_0_0.
|
||||
The square above that one would be: SAR_area_0_1
|
||||
the square one to the right of the bottom left square is SAR_area_1_0
|
||||
|
||||
You want to change the number arrays in the below lines:
|
||||
|
||||
The order for these numbers is always [BANDIT, SURVIVOR, SOLDIER]
|
||||
|
||||
Lets take an example for Chernarus
|
||||
|
||||
// Kamenka, 0 bandit groups, 1 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,1,2],[0,75,100],[0,4,3]],"SAR_area_0_0"] call SAR_AI_mon_upd;
|
||||
|
||||
[[0,1,2],[0,75,100],[0,4,3]]
|
||||
|
||||
the first set of numbers : 0,1,2
|
||||
stands for
|
||||
0 bandit groups
|
||||
1 soldier group
|
||||
2 surivors groups
|
||||
thats the max that can spawn in this grid
|
||||
|
||||
the second set of numbers : 0,75,100
|
||||
that means:
|
||||
0% probability to spawn bandit groups
|
||||
75% for soldiers
|
||||
100% for survivors
|
||||
|
||||
the last set of numbers : 0,4,3
|
||||
thats the maximum number of ppl in the group (plus 1 leader)
|
||||
0 bandits
|
||||
max 4 (+1 leader) soldiers
|
||||
max 3 (+1 leader) survivors
|
||||
this number is randomized
|
||||
*/
|
||||
//
|
||||
// grid definition for the automatic spawn system
|
||||
//
|
||||
|
||||
_type = _this select 0;
|
||||
|
||||
// grid definition for the automatic spawn system
|
||||
if ((_type == "dynamic") && SAR_dynamic_spawning) then {
|
||||
|
||||
|
||||
|
||||
diag_log format["SAR_AI: Dynamic spawning definition / adjustments started"];
|
||||
|
||||
// Kamenka, 0 bandit groups, 1 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[0,1,2],[0,100,100],[0,2,1]],"SAR_area_0_0"] call SAR_AI_mon_upd;
|
||||
|
||||
// Balota, 1 bandit groups, 0 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[1,0,2],[80,0,80],[2,0,3]],"SAR_area_1_0"] call SAR_AI_mon_upd;
|
||||
|
||||
// Cherno, 2 bandit groups, 0 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[2,0,3],[75,0,75],[4,0,4]],"SAR_area_2_0"] call SAR_AI_mon_upd;
|
||||
|
||||
// Prido, 1 bandit groups, 0 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[1,0,3],[50,0,50],[4,0,2]],"SAR_area_3_0"] call SAR_AI_mon_upd;
|
||||
|
||||
// Elektro, 2 bandit groups, 0 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[2,0,3],[50,0,50],[4,0,4]],"SAR_area_4_0"] call SAR_AI_mon_upd;
|
||||
|
||||
// Kamyshovo, 0 bandit groups, 0 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[0,0,1],[0,0,80],[0,0,3]],"SAR_area_5_0"] call SAR_AI_mon_upd;
|
||||
|
||||
// Tulga, 0 bandit groups, 0 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[0,0,1],[0,0,80],[0,0,3]],"SAR_area_5_1"] call SAR_AI_mon_upd;
|
||||
|
||||
// Solni, 1 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[1,0,0],[80,0,0],[2,0,0]],"SAR_area_5_2"] call SAR_AI_mon_upd;
|
||||
|
||||
// Berezino, 0 bandit groups, 0 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[0,0,3],[0,0,75],[0,0,3]],"SAR_area_5_3"] call SAR_AI_mon_upd;
|
||||
|
||||
// Khelm, 1 bandit groups, 0 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[1,0,1],[75,0,75],[3,0,3]],"SAR_area_5_4"] call SAR_AI_mon_upd;
|
||||
|
||||
// NEAF, 0 bandit groups, 3 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[0,3,1],[0,50,75],[0,2,4]],"SAR_area_5_5"] call SAR_AI_mon_upd;
|
||||
|
||||
// NWAF, 0 bandit groups, 2 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[0,2,1],[0,50,75],[0,2,4]],"SAR_area_1_4"] call SAR_AI_mon_upd;
|
||||
|
||||
// Stary, 3 bandit groups, 0 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[3,0,3],[50,0,50],[3,0,3]],"SAR_area_2_2"] call SAR_AI_mon_upd;
|
||||
|
||||
// Devils Castle, 2 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[2,0,0],[75,0,0],[3,0,0]],"SAR_area_2_4"] call SAR_AI_mon_upd;
|
||||
|
||||
// Skalka, 1 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[1,0,0],[75,0,0],[3,0,0]],"SAR_area_0_5"] call SAR_AI_mon_upd;
|
||||
|
||||
// Petrovka1, 2 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[2,0,0],[75,0,0],[3,0,0]],"SAR_area_1_5"] call SAR_AI_mon_upd;
|
||||
|
||||
// Petrovka2, 2 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[2,0,0],[75,0,0],[3,0,0]],"SAR_area_2_5"] call SAR_AI_mon_upd;
|
||||
|
||||
// Pobeda, 2 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[2,0,0],[75,0,0],[3,0,0]],"SAR_area_3_5"] call SAR_AI_mon_upd;
|
||||
|
||||
// Krasno, 0 bandit groups, 1 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[0,1,1],[0,75,75],[0,4,2]],"SAR_area_4_5"] call SAR_AI_mon_upd;
|
||||
|
||||
// test south of lopatino, 1 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[1,0,0],[100,0,0],[6,0,0]],"SAR_area_0_3"] call SAR_AI_mon_upd;
|
||||
|
||||
diag_log format["SAR_AI: Dynamic spawning definition / adjustments finished"];
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
if (_type == "static") then {
|
||||
//
|
||||
// Definition of area markers for static spawns
|
||||
//
|
||||
|
||||
diag_log format["SAR_AI: Static spawning area definition started"];
|
||||
|
||||
// soutcoast, heli patrol area
|
||||
_this = createMarker ["SAR_marker_helipatrol_southcoast", [7997.2837, 2687.6707]];
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [6500, 1200];
|
||||
SAR_marker_helipatrol_southcoast = _this;
|
||||
|
||||
// eastcoast, heli patrol area
|
||||
_this = createMarker ["SAR_marker_helipatrol_eastcoast", [13304.196, 8220.9795]];
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [1200, 6000];
|
||||
SAR_marker_helipatrol_eastcoast = _this;
|
||||
|
||||
// NWAF, heli patrol area
|
||||
_this = createMarker ["SAR_marker_helipatrol_nwaf", [4525.3335, 10292.299]];
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [1500, 500];
|
||||
_this setMarkerDir 59.354115;
|
||||
SAR_marker_helipatrol_nwaf = _this;
|
||||
|
||||
// NEAF, heli patrol area
|
||||
_this = createMarker ["SAR_marker_helipatrol_neaf", [12034.16, 12725.376, 0]];
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [1000, 600];
|
||||
SAR_marker_helipatrol_neaf = _this;
|
||||
|
||||
|
||||
_this = createMarker ["SAR_marker_DEBUG_veh", [1951.4304, 11905.569]];
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 1000];
|
||||
_this setMarkerDir -19.085985;
|
||||
SAR_marker_DEBUG_veh = _this;
|
||||
|
||||
_this = createMarker ["SAR_marker_DEBUG_devilscastle", [6913.47,11437.2,0.001]];
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [10, 10];
|
||||
SAR_marker_DEBUG_devilscastle = _this;
|
||||
|
||||
diag_log format["SAR_AI: Static spawning area definition finished"];
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
// End of area marker definition section
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// Static, predefined heli patrol areas with configurable units
|
||||
//---------------------------------------------------------------------------------
|
||||
//
|
||||
// format: [areamarker,type_of_group,(respawn),(respawntime)] call SAR_AI;
|
||||
//
|
||||
// areamarker : Name of an area, as defined in your area definitions (MUST NOT BE similar to SAR_area_ ! THIS IS IMPORTANT!)
|
||||
// type_of_group : 1 = military, 2 = survivors, 3 = bandits
|
||||
//
|
||||
// respawn : true or false (optional)
|
||||
// respawntime : time in secs until group respawns (optional)
|
||||
// air_vehicle_type : classnema of the air vehicle you want to use
|
||||
//
|
||||
//
|
||||
// Note: The crew will be automatically seized to man any available gun in the airplane / heli.
|
||||
//
|
||||
// Examples:
|
||||
//
|
||||
// A) military air group patrolling, respawning, respawn time = default configured time, using default randomized vehicles
|
||||
//
|
||||
// [SAR_marker_DEBUG,1,true] call SAR_AI_heli;
|
||||
//
|
||||
// B) bandit air group patrolling, not respawning,
|
||||
//
|
||||
// [SAR_marker_DEBUG,3] call SAR_AI_heli;
|
||||
//
|
||||
// C) survivor air group patrolling, respawning, respawn time = 120 seconds
|
||||
//
|
||||
// [SAR_marker_DEBUG,true,120] call SAR_AI_heli;
|
||||
//
|
||||
//---------------------------------------------------------------------------------
|
||||
diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"];
|
||||
|
||||
//
|
||||
// define your static air patrols here
|
||||
//
|
||||
|
||||
//Heli Patrol NWAF
|
||||
[SAR_marker_helipatrol_nwaf,1,true] call SAR_AI_heli;
|
||||
|
||||
//Heli Patrol NEAF
|
||||
[SAR_marker_helipatrol_neaf,1,true] call SAR_AI_heli;
|
||||
|
||||
// Heli patrol south coast
|
||||
[SAR_marker_helipatrol_southcoast,1,true] call SAR_AI_heli;
|
||||
[SAR_marker_helipatrol_southcoast,1,true] call SAR_AI_heli;
|
||||
|
||||
// heli patrol east coast
|
||||
[SAR_marker_helipatrol_eastcoast,1,true] call SAR_AI_heli;
|
||||
[SAR_marker_helipatrol_eastcoast,1,true] call SAR_AI_heli;
|
||||
|
||||
|
||||
// example war scenario in the northwest. Comment OUT after having had a look at it!
|
||||
[SAR_marker_DEBUG_veh,1,true,30] call SAR_AI_heli;
|
||||
[SAR_marker_DEBUG_veh,1,true,30] call SAR_AI_heli;
|
||||
[SAR_marker_DEBUG_veh,3,true,30] call SAR_AI_heli;
|
||||
[SAR_marker_DEBUG_veh,3,true,30] call SAR_AI_heli;
|
||||
|
||||
|
||||
diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// Static, predefined infantry patrols in defined areas with configurable units
|
||||
//---------------------------------------------------------------------------------
|
||||
//
|
||||
// format: [areamarker,type_of_group,number_of_snipers,number_of_riflemen,action_to_do,(respawn),(respawntime)] call SAR_AI;
|
||||
//
|
||||
// areamarker : Name of an area, as defined in your area definitions (MUST NOT BE similar to SAR_area_ ! THIS IS IMPORTANT!)
|
||||
// type_of_group : 1 = military, 2 = survivors, 3 = bandits
|
||||
// number_of_snipers : amount of snipers in the group
|
||||
// number_of_riflemen : amount of riflemen in the group
|
||||
//
|
||||
// action_to_do : groupaction (optional, default is "patrol")
|
||||
// possible values:
|
||||
// "fortify" -> the group will search for nearby buildings and move in them. They will stay there until an enemy spotted, then they will chase him.
|
||||
// "ambush" -> the group will look for a nearby road, and setup an ambush. They will not move until an enemy was spotted.
|
||||
// "patrol" -> the group will patrol random waypoints in the area, and engage any enemy they see.
|
||||
//
|
||||
// respawn : true or false (optional)
|
||||
// respawntime : time in secs until group respawns (optional)
|
||||
//
|
||||
// Examples:
|
||||
//
|
||||
// A) military group patrolling, with 1 leader and 1 rifleman, respawning, respawn time = default configured time
|
||||
//
|
||||
// [SAR_marker_DEBUG,1,0,1,"patrol",true] call SAR_AI;
|
||||
//
|
||||
// B) bandit group patrolling, with 1 leader, 2 snipers and 1 rifleman, respawning, respawn time = 30 seconds
|
||||
//
|
||||
// [SAR_marker_DEBUG,3,2,1,"patrol",true,30] call SAR_AI;
|
||||
//
|
||||
// C) survivor group fortifying, with 1 leader, 1 sniper and 3 riflemen, not respawning
|
||||
//
|
||||
// [SAR_marker_DEBUG,2,1,3,"fortify",false] call SAR_AI;
|
||||
//
|
||||
//---------------------------------------------------------------------------------
|
||||
|
||||
diag_log format["SAR_AI: Static Spawning for infantry patrols started"];
|
||||
|
||||
//
|
||||
// define your static infantry patrols here
|
||||
//
|
||||
|
||||
[SAR_marker_DEBUG_devilscastle,1,0,6,"fortify",true] call SAR_AI;
|
||||
|
||||
// example war scenario in the northwest. Comment OUT after having had a look at it!
|
||||
[SAR_marker_DEBUG_veh,1,0,9,"patrol",true] call SAR_AI;
|
||||
[SAR_marker_DEBUG_veh,2,0,9,"patrol",true] call SAR_AI;
|
||||
[SAR_marker_DEBUG_veh,3,0,9,"patrol",true] call SAR_AI;
|
||||
[SAR_marker_DEBUG_veh,3,0,9,"patrol",true] call SAR_AI;
|
||||
|
||||
|
||||
diag_log format["SAR_AI: Static Spawning for infantry patrols finished"];
|
||||
|
||||
// -------------------------------------------------------------------------------------
|
||||
//
|
||||
// Static spawns for vehicle groups
|
||||
//
|
||||
// format: [areamarker,type_of_group,vehicle array,crew array,(respawn),(respawntime)] call SAR_AI_land;
|
||||
//
|
||||
//
|
||||
// areamarker : Name of an area, as defined in your area definitions
|
||||
// type_of_group : 1 = military, 2 = survivors, 3 = bandits
|
||||
// vehicle array : e.g. ["car1"], MUST be enclosed by [], and MUST be valid vehicle classnames. multiple vehicles are possible, like this: ["car1","car1","car1"]
|
||||
// crew array : e.g. [[1,2,3]] -> the first entry in the array element sets if the leader travels in that vehicle, the second is the number of snipers in the vehicle, the third is the number of riflemen.
|
||||
// must match to the number of defined vehicles, so for the above example, you need: [[1,2,3],[0,1,2],[0,1,1]]
|
||||
//
|
||||
//
|
||||
// respawn : true or false (optional)
|
||||
// respawntime : time in secs until group respawns (optional)
|
||||
//
|
||||
//
|
||||
//
|
||||
// Examples:
|
||||
//
|
||||
// A) This will spawn an AI group with 1 vehicle(UAZ), and 3 AI in it
|
||||
/*
|
||||
[
|
||||
SAR_marker_DEBUG_veh_1, // Name of the area that the vehicle patrol will spawn in
|
||||
1, // type of group
|
||||
["UAZ_Unarmed_TK_EP1"], // used vehicles
|
||||
[[1,1,1]], // Vehicle initial crew
|
||||
false // if this group should respawn or not
|
||||
] call SAR_AI_land;
|
||||
*/
|
||||
//
|
||||
// B) This will spawn an AI group with 1 vehicle, 3 AI in the UAZ, and this group will respawn after 60 seconds
|
||||
/*
|
||||
[
|
||||
SAR_marker_DEBUG_veh_1, // Name of the area that the vehicle patrol will spawn in
|
||||
1, // type of group
|
||||
["UAZ_Unarmed_TK_EP1"], // used vehicle
|
||||
[[1,1,1]], // Vehicle initial crews
|
||||
true, // if this group should respawn or not
|
||||
60 // waittime until this group will respawn
|
||||
] call SAR_AI_land;
|
||||
*/
|
||||
//
|
||||
// -------------------------------------------------------------------------------------
|
||||
diag_log format["SAR_AI: Static Spawning for vehicle patrols started"];
|
||||
|
||||
//
|
||||
// define your static vehicle patrols here
|
||||
//
|
||||
|
||||
// example war scenario in the northwest. Comment OUT after having had a look at it!
|
||||
/* [
|
||||
SAR_marker_DEBUG_veh, // Name of the area that the vehicle patrol will spawn in
|
||||
1, // type of group
|
||||
["LandRover_CZ_EP1","M1030","M1030","LandRover_CZ_EP1"], // used vehicle
|
||||
[[1,1,1],[0,1,1],[0,1,1],[0,1,1]], // Vehicle initial crew
|
||||
true, // if this group should respawn or not
|
||||
10
|
||||
] call SAR_AI_land;
|
||||
|
||||
[
|
||||
SAR_marker_DEBUG_veh, // Name of the area that the vehicle patrol will spawn in
|
||||
3, // type of group
|
||||
["M1030","M1030","M1030","M1030"], // used vehicle
|
||||
[[1,1,0],[0,1,1],[0,1,1],[0,1,1]], // Vehicle initial crew
|
||||
true, // if this group should respawn or not
|
||||
60 // waittime until this group will respawn
|
||||
] call SAR_AI_land;
|
||||
|
||||
[
|
||||
SAR_marker_DEBUG_veh, // Name of the area that the vehicle patrol will spawn in
|
||||
2, // type of group
|
||||
["M1030"], // used vehicle
|
||||
[[1,1,0]], // Vehicle initial crew
|
||||
true, // if this group should respawn or not
|
||||
60 // waittime until this group will respawn
|
||||
] call SAR_AI_land; */
|
||||
|
||||
diag_log format["SAR_AI: Static Spawning for vehicle patrols finished"];
|
||||
// ---- end of configuration area ----
|
||||
};
|
@ -1,117 +0,0 @@
|
||||
/*
|
||||
IMPORTANT: The grid squares are named like : SAR_area_0_0
|
||||
|
||||
where the first 0 is the x counter, and the second 0 the y counter.
|
||||
|
||||
So to adress the bottom left square in the grid, you use SAR_area_0_0.
|
||||
The square above that one would be: SAR_area_0_1
|
||||
the square one to the right of the bottom left square is SAR_area_1_0
|
||||
|
||||
You want to change the number arrays in the below lines:
|
||||
|
||||
The order for these numbers is always [BANDIT, SURVIVOR, SOLDIER]
|
||||
|
||||
Lets take an example for Chernarus
|
||||
|
||||
// Kamenka, 0 bandit groups, 1 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,1,2],[0,75,100],[0,4,3]],"SAR_area_0_0"] call SAR_AI_mon_upd;
|
||||
|
||||
[[0,1,2],[0,75,100],[0,4,3]]
|
||||
|
||||
the first set of numbers : 0,1,2
|
||||
stands for
|
||||
0 bandit groups
|
||||
1 soldier group
|
||||
2 surivors groups
|
||||
thats the max that can spawn in this grid
|
||||
|
||||
the second set of numbers : 0,75,100
|
||||
that means:
|
||||
0% probability to spawn bandit groups
|
||||
75% for soldiers
|
||||
100% for survivors
|
||||
|
||||
the last set of numbers : 0,4,3
|
||||
thats the maximum number of ppl in the group (plus 1 leader)
|
||||
0 bandits
|
||||
max 4 (+1 leader) soldiers
|
||||
max 3 (+1 leader) survivors
|
||||
this number is randomized
|
||||
*/
|
||||
// --------------------------------------------------
|
||||
// grid definition for the automatic spawn system
|
||||
//
|
||||
// examples see the chernarus file
|
||||
// --------------------------------------------------
|
||||
_type = _this select 0;
|
||||
|
||||
// grid definition for the automatic spawn system
|
||||
if ((_type == "dynamic") && SAR_dynamic_spawning) then {
|
||||
|
||||
// add entries here ...
|
||||
|
||||
};
|
||||
|
||||
if (_type == "static") then {
|
||||
// ---------------------------------------------------------------
|
||||
// Definition of area markers for static spawns
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
// add if needed, see examples in the chernarus file
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
// End of area marker definition section
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
diag_log format["SAR_AI: Area & Trigger definition finalized"];
|
||||
diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"];
|
||||
|
||||
//
|
||||
// Static, predefined heli patrol areas with configurable units
|
||||
//
|
||||
// Parameters used:
|
||||
// Areaname
|
||||
// 1,2,3 = soldier, survivors, bandits
|
||||
//
|
||||
|
||||
// add if needed, see examples in the chernarus file
|
||||
|
||||
diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// Static, predefined infantry patrols in defined areas with configurable units
|
||||
//---------------------------------------------------------------------------------
|
||||
// Example: [SAR_area_DEBUG,1,0,1,""] call SAR_AI;
|
||||
//
|
||||
// SAR_area_DEBUG = areaname (must have been defined further up)
|
||||
// 1 = type of group (1 = soldiers, 2 = survivors, 3 = bandits)
|
||||
// 0 = amount of snipers in the group
|
||||
// 1 = amount of rifleman in the group
|
||||
//
|
||||
//
|
||||
|
||||
// Example entries:
|
||||
// SARGE DEBUG - Debug group
|
||||
// military, 0 snipers, 1 riflemen, patrol
|
||||
//[SAR_area_DEBUG,1,0,1,""] call SAR_AI;
|
||||
|
||||
// military, 2 snipers, 4 riflemen, patrol
|
||||
//[SAR_area_DEBUG,1,2,4,""] call SAR_AI;
|
||||
|
||||
// survivors, 1 snipers, 3 riflemen, patrolling the NWAF
|
||||
//[SAR_marker_helipatrol_nwaf,2,1,3,""] call SAR_AI;
|
||||
|
||||
// bandits, 5 snipers, 2 riflemen, patrolling the NWAF
|
||||
//[SAR_marker_helipatrol_nwaf,3,5,2,""] call SAR_AI;
|
||||
//---------------------------------------------------------------------------------
|
||||
|
||||
// add here if needed
|
||||
|
||||
|
||||
|
||||
|
||||
// ---- end of configuration area ----
|
||||
|
||||
diag_log format["SAR_AI: Static Spawning for infantry patrols finished"];
|
||||
};
|
@ -1,205 +0,0 @@
|
||||
/*
|
||||
IMPORTANT: The grid squares are named like : SAR_area_0_0
|
||||
|
||||
where the first 0 is the x counter, and the second 0 the y counter.
|
||||
|
||||
So to adress the bottom left square in the grid, you use SAR_area_0_0.
|
||||
The square above that one would be: SAR_area_0_1
|
||||
the square one to the right of the bottom left square is SAR_area_1_0
|
||||
|
||||
You want to change the number arrays in the below lines:
|
||||
|
||||
The order for these numbers is always [BANDIT, SURVIVOR, SOLDIER]
|
||||
|
||||
Lets take an example for Chernarus
|
||||
|
||||
// Kamenka, 0 bandit groups, 1 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,1,2],[0,75,100],[0,4,3]],"SAR_area_0_0"] call SAR_AI_mon_upd;
|
||||
|
||||
[[0,1,2],[0,75,100],[0,4,3]]
|
||||
|
||||
the first set of numbers : 0,1,2
|
||||
stands for
|
||||
0 bandit groups
|
||||
1 soldier group
|
||||
2 surivors groups
|
||||
thats the max that can spawn in this grid
|
||||
|
||||
the second set of numbers : 0,75,100
|
||||
that means:
|
||||
0% probability to spawn bandit groups
|
||||
75% for soldiers
|
||||
100% for survivors
|
||||
|
||||
the last set of numbers : 0,4,3
|
||||
thats the maximum number of ppl in the group (plus 1 leader)
|
||||
0 bandits
|
||||
max 4 (+1 leader) soldiers
|
||||
max 3 (+1 leader) survivors
|
||||
this number is randomized
|
||||
*/
|
||||
// --------------------------------------------------
|
||||
// grid definition for the automatic spawn system
|
||||
//
|
||||
// examples see the chernarus file
|
||||
// --------------------------------------------------
|
||||
|
||||
_type = _this select 0;
|
||||
|
||||
// grid definition for the automatic spawn system
|
||||
if ((_type == "dynamic") && SAR_dynamic_spawning) then {
|
||||
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,0,2],[45,0,45],[0,0,0]],"SAR_area_0_0"] call SAR_AI_mon_upd; //Pintosa, Alma, Corda, Mercadio
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,0,2],[45,0,45],[0,0,0]],"SAR_area_1_0"] call SAR_AI_mon_upd; //Verto, Medlina
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[4,3,4],[75,70,85],[2,2,1]],"SAR_area_2_0"] call SAR_AI_mon_upd; //Calamar (main+south)
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[20,20,20],[0,0,1]],"SAR_area_3_0"] call SAR_AI_mon_upd; //Wilderness
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,1,1],[0,25,25],[0,0,1]],"SAR_area_4_0"] call SAR_AI_mon_upd; //Depot (Old Mines)
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,0,2],[25,0,45],[0,0,0]],"SAR_area_5_0"] call SAR_AI_mon_upd; //Chupinka
|
||||
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,0,1],[25,0,35],[1,0,1]],"SAR_area_0_1"] call SAR_AI_mon_upd; //Drassen, Rago
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_1_1"] call SAR_AI_mon_upd; //Barro, Aguado - NO SPAWNS
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,2,2],[35,40,45],[2,1,2]],"SAR_area_2_1"] call SAR_AI_mon_upd; //Bilbado, Montehofo, Calamar (north)
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,0,2],[15,0,35],[1,0,1]],"SAR_area_3_1"] call SAR_AI_mon_upd; //Negroso, Lagosa, Prospero
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,0,1],[35,0,35],[0,0,1]],"SAR_area_4_1"] call SAR_AI_mon_upd; //El Villon, Marcella, Monga
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,0,1],[35,0,35],[1,0,1]],"SAR_area_5_1"] call SAR_AI_mon_upd; //Pikawas, Palida
|
||||
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_0_2"] call SAR_AI_mon_upd; //Villa Oscura, Motodrom Rapido - NO SPAWNS
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,0,1],[45,0,35],[1,0,1]],"SAR_area_1_2"] call SAR_AI_mon_upd; //Los Peligron, Morada, OPEN WASTELAND
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,1,1],[35,30,35],[1,1,1]],"SAR_area_2_2"] call SAR_AI_mon_upd; //San Arluco (south), Aeropuerto Peligron, Pancho
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[3,2,2],[75,70,65],[2,2,2]],"SAR_area_3_2"] call SAR_AI_mon_upd; //Corazon, Checkpoint Sur
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,2,2],[45,50,55],[0,1,1]],"SAR_area_4_2"] call SAR_AI_mon_upd; //Victorin, SanVigado
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_5_2"] call SAR_AI_mon_upd; //WATER ONLY - NO SPAWNS
|
||||
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,1,2],[45,30,45],[0,0,1]],"SAR_area_0_3"] call SAR_AI_mon_upd; //Pocobay, Benio, Pista
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,2,2],[55,60,55],[2,1,1]],"SAR_area_1_3"] call SAR_AI_mon_upd; //Vidora, Mairango, Fernando, Elcanto
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,2,2],[50,50,50],[2,2,1]],"SAR_area_2_3"] call SAR_AI_mon_upd; //Mercielo, Guayucca, Tucos, San Arluco (north)
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[65,60,75],[0,1,1]],"SAR_area_3_3"] call SAR_AI_mon_upd; //Calapedro, OPEN WASTELAND
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[4,2,2],[75,60,55],[2,1,2]],"SAR_area_4_3"] call SAR_AI_mon_upd; //Maruko (south), Dump Yard
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_5_3"] call SAR_AI_mon_upd; //WATER ONLY - NO SPAWNS
|
||||
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_0_4"] call SAR_AI_mon_upd; //East Island tip - NO SPAWNS
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,2,1],[75,75,75],[1,1,1]],"SAR_area_1_4"] call SAR_AI_mon_upd; //FOB Eddie, OPEN WASTELAND
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,1,2],[65,50,55],[1,1,2]],"SAR_area_2_4"] call SAR_AI_mon_upd; //Aculto, Garibosa, Research Lab 101
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,1,2],[75,60,55],[1,2,1]],"SAR_area_3_4"] call SAR_AI_mon_upd; //San Isobel, Rommelo Raceway, Maruko airport (west)
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[5,3,2],[75,70,65],[1,1,1]],"SAR_area_4_4"] call SAR_AI_mon_upd; //Maruko (north), Maruko airport (east)
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[3,2,0],[55,50,0],[2,1,0]],"SAR_area_5_4"] call SAR_AI_mon_upd; //NE Island (south)
|
||||
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_0_5"] call SAR_AI_mon_upd; //DEBUG ISLAND - NO SPAWNS
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[3,2,1],[75,70,45],[2,2,1]],"SAR_area_1_5"] call SAR_AI_mon_upd; //Prison, OPEN WASTELAND
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,2,1],[75,70,60],[0,0,0]],"SAR_area_2_5"] call SAR_AI_mon_upd; //OPEN WASTELAND
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_3_5"] call SAR_AI_mon_upd; //MAINLY WATER - NO SPAWNS
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,0],[50,50,0],[0,0,0]],"SAR_area_4_5"] call SAR_AI_mon_upd; //SMALL NE ISLAND
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,1,1],[45,40,35],[2,1,0]],"SAR_area_5_5"] call SAR_AI_mon_upd; //NE Island (north)
|
||||
};
|
||||
|
||||
if (_type == "static") then {
|
||||
|
||||
_this = createMarker ["SAR_patrol_prison", [3024.6147, 7969.0239]];
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [1500, 1050];
|
||||
SAR_marker_helipatrol_prison = _this;
|
||||
|
||||
_this = createMarker ["SAR_patrol_maruko_airport", [6451.5801, 6991.4985]];
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [1000, 1500];
|
||||
SAR_marker_helipatrol_maruko_airport = _this;
|
||||
|
||||
_this = createMarker ["SAR_patrol_fob_eddie", [3058.3813, 6605.2446]];
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [1500, 1500];
|
||||
SAR_marker_helipatrol_fob_eddie = _this;
|
||||
|
||||
_this = createMarker ["SAR_patrol_calamar", [4261.3984, 1487.6489]];
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [2000, 2000];
|
||||
SAR_marker_helipatrol_calamar = _this;
|
||||
|
||||
_this = createMarker ["SAR_patrol_mainland", [3280.0093, 3431.8176]];
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [4500, 4500];
|
||||
SAR_marker_helipatrol_mainland = _this;
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Definition of area markers for static spawns
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
// add if needed, see examples in the chernarus file
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
// End of area marker definition section
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
diag_log format["SAR_AI: Area & Trigger definition finalized"];
|
||||
diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"];
|
||||
|
||||
//
|
||||
// Static, predefined heli patrol areas with configurable units
|
||||
//
|
||||
// Parameters used:
|
||||
// Areaname
|
||||
// 1,2,3 = soldier, survivors, bandits
|
||||
//
|
||||
|
||||
// add if needed, see examples in the chernarus file
|
||||
|
||||
[SAR_marker_helipatrol_prison,floor(random 2)+1] call SAR_AI_heli;
|
||||
[SAR_marker_helipatrol_maruko_airport,floor(random 2)+1] call SAR_AI_heli;
|
||||
[SAR_marker_helipatrol_fob_eddie,floor(random 2)+1] call SAR_AI_heli;
|
||||
[SAR_marker_helipatrol_calamar,floor(random 2)+1] call SAR_AI_heli;
|
||||
[SAR_marker_helipatrol_mainland,floor(random 2)+1] call SAR_AI_heli;
|
||||
|
||||
diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// Static, predefined infantry patrols in defined areas with configurable units
|
||||
//---------------------------------------------------------------------------------
|
||||
// Example: [SAR_area_DEBUG,1,0,1,""] call SAR_AI;
|
||||
//
|
||||
// SAR_area_DEBUG = areaname (must have been defined further up)
|
||||
// 1 = type of group (1 = soldiers, 2 = survivors, 3 = bandits)
|
||||
// 0 = amount of snipers in the group
|
||||
// 1 = amount of rifleman in the group
|
||||
//
|
||||
//
|
||||
|
||||
// Example entries:
|
||||
// SARGE DEBUG - Debug group
|
||||
// military, 0 snipers, 1 riflemen, patrol
|
||||
//[SAR_area_DEBUG,1,0,1,""] call SAR_AI;
|
||||
|
||||
// military, 2 snipers, 4 riflemen, patrol
|
||||
//[SAR_area_DEBUG,1,2,4,""] call SAR_AI;
|
||||
|
||||
// survivors, 1 snipers, 3 riflemen, patrolling the NWAF
|
||||
//[SAR_marker_helipatrol_nwaf,2,1,3,""] call SAR_AI;
|
||||
|
||||
// bandits, 5 snipers, 2 riflemen, patrolling the NWAF
|
||||
//[SAR_marker_helipatrol_nwaf,3,5,2,""] call SAR_AI;
|
||||
//---------------------------------------------------------------------------------
|
||||
|
||||
// add here if needed
|
||||
|
||||
|
||||
|
||||
|
||||
// ---- end of configuration area ----
|
||||
|
||||
diag_log format["SAR_AI: Static Spawning for infantry patrols finished"];
|
||||
};
|
@ -1,696 +0,0 @@
|
||||
/*
|
||||
IMPORTANT: The grid squares are named like : SAR_area_0_0
|
||||
|
||||
where the first 0 is the x counter, and the second 0 the y counter.
|
||||
|
||||
So to adress the bottom left square in the grid, you use SAR_area_0_0.
|
||||
The square above that one would be: SAR_area_0_1
|
||||
the square one to the right of the bottom left square is SAR_area_1_0
|
||||
|
||||
You want to change the number arrays in the below lines:
|
||||
|
||||
The order for these numbers is always [BANDIT, SURVIVOR, SOLDIER]
|
||||
|
||||
Lets take an example for Chernarus
|
||||
|
||||
// Kamenka, 0 bandit groups, 1 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,1,2],[0,75,100],[0,4,3]],"SAR_area_0_0"] call SAR_AI_mon_upd;
|
||||
|
||||
[[0,1,2],[0,75,100],[0,4,3]]
|
||||
|
||||
the first set of numbers : 0,1,2
|
||||
stands for
|
||||
0 bandit groups
|
||||
1 soldier group
|
||||
2 surivors groups
|
||||
thats the max that can spawn in this grid
|
||||
|
||||
the second set of numbers : 0,75,100
|
||||
that means:
|
||||
0% probability to spawn bandit groups
|
||||
75% for soldiers
|
||||
100% for survivors
|
||||
|
||||
the last set of numbers : 0,4,3
|
||||
thats the maximum number of ppl in the group (plus 1 leader)
|
||||
0 bandits
|
||||
max 4 (+1 leader) soldiers
|
||||
max 3 (+1 leader) survivors
|
||||
this number is randomized
|
||||
*/
|
||||
// --------------------------------------------------
|
||||
// grid definition for the automatic spawn system
|
||||
//
|
||||
// examples see the chernarus file
|
||||
// --------------------------------------------------
|
||||
_type = _this select 0;
|
||||
|
||||
// grid definition for the automatic spawn system
|
||||
if ((_type == "dynamic") && SAR_dynamic_spawning) then {
|
||||
|
||||
// Lindwedel & mellendorf
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[3,1,1],[3,3,3]],"SAR_area_0_0"] call SAR_AI_mon_upd;
|
||||
// Schwarmstedt & highway 7 bridge
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[9,3,3],[4,4,4]],"SAR_area_0_1"] call SAR_AI_mon_upd;
|
||||
// Hademstorf
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[3,1,1],[3,3,3]],"SAR_area_0_2"] call SAR_AI_mon_upd;
|
||||
// Fallingbostel & Dushorn
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[9,3,3],[4,4,4]],"SAR_area_0_3"] call SAR_AI_mon_upd;
|
||||
// Benefeld
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[3,1,1],[3,3,3]],"SAR_area_0_4"] call SAR_AI_mon_upd;
|
||||
|
||||
//-------------------
|
||||
|
||||
// Fuhrberg & South Highway 7
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[9,3,3],[4,4,4]],"SAR_area_1_0"] call SAR_AI_mon_upd;
|
||||
// Thoren
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[3,1,1],[3,3,3]],"SAR_area_1_1"] call SAR_AI_mon_upd;
|
||||
// Melssendorf
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[3,1,1],[3,3,3]],"SAR_area_1_2"] call SAR_AI_mon_upd;
|
||||
// Wasteland
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[9,3,3],[4,4,4]],"SAR_area_1_3"] call SAR_AI_mon_upd;
|
||||
// Dorfmark
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[9,3,3],[4,4,4]],"SAR_area_1_4"] call SAR_AI_mon_upd;
|
||||
|
||||
//---------------------
|
||||
|
||||
// gas station west of SAF
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[3,1,1],[3,3,3]],"SAR_area_2_0"] call SAR_AI_mon_upd;
|
||||
// Winsen & Sudwinsen
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[9,3,3],[4,4,4]],"SAR_area_2_1"] call SAR_AI_mon_upd;
|
||||
// Walle & Offen
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[3,1,1],[3,3,3]],"SAR_area_2_2"] call SAR_AI_mon_upd;
|
||||
// Bergen
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[9,3,3],[4,4,4]],"SAR_area_2_3"] call SAR_AI_mon_upd;
|
||||
// Wietzendorf
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[9,3,3],[4,4,4]],"SAR_area_2_4"] call SAR_AI_mon_upd;
|
||||
|
||||
//------------------------
|
||||
|
||||
// Celle & SAF
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[9,3,3],[4,4,4]],"SAR_area_3_0"] call SAR_AI_mon_upd;
|
||||
// Klein Hehlen & Schuen Region
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[9,3,3],[4,4,4]],"SAR_area_3_1"] call SAR_AI_mon_upd;
|
||||
// Eversen
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[3,1,1],[3,3,3]],"SAR_area_3_2"] call SAR_AI_mon_upd;
|
||||
// Beckedorf
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[9,3,3],[4,4,4]],"SAR_area_3_3"] call SAR_AI_mon_upd;
|
||||
// Muden & Northern Pond
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[3,1,1],[3,3,3]],"SAR_area_3_4"] call SAR_AI_mon_upd;
|
||||
|
||||
//------------------------
|
||||
|
||||
// Wienhausen
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[3,1,1],[3,3,3]],"SAR_area_4_0"] call SAR_AI_mon_upd;
|
||||
// North of Wienhausen
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[3,1,1],[3,3,3]],"SAR_area_4_1"] call SAR_AI_mon_upd;
|
||||
// Eschede
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[3,1,1],[3,3,3]],"SAR_area_4_2"] call SAR_AI_mon_upd;
|
||||
// South of Fassberg & NAF
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[3,1,1],[3,3,3]],"SAR_area_4_3"] call SAR_AI_mon_upd;
|
||||
// Fassberg & NAF
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[9,3,3],[4,4,4]],"SAR_area_4_4"] call SAR_AI_mon_upd;
|
||||
};
|
||||
|
||||
if (_type == "static") then {
|
||||
// ---------------------------------------------------------------
|
||||
// Definition of area markers for static spawns
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
_this = createMarker ["Celle_Courtyard", [8769.3633, 2077.6267, 0]];
|
||||
_this setMarkerText "Celle_Courtyard";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Celle_Courtyard = _this;
|
||||
|
||||
_this = createMarker ["SAF_Control_Tower", [7593.5557, 1075.5316, 2.5749207e-005]];
|
||||
_this setMarkerText "SAF_Control_Tower";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_SAF_Control_Tower = _this;
|
||||
|
||||
_this = createMarker ["Wienhausen", [10796.543, 794.20032, 1.0967255e-005]];
|
||||
_this setMarkerText "Wienhausen";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Wienhausen = _this;
|
||||
|
||||
_this = createMarker ["Lachendorf", [11945.233, 2269.1538, 9.5367432e-007]];
|
||||
_this setMarkerText "Lachendorf";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Lachendorf = _this;
|
||||
|
||||
_this = createMarker ["Hambuhren", [6976.8833, 2576.8459, 4.7683716e-006]];
|
||||
_this setMarkerText "Hambuhren";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Hambuhren = _this;
|
||||
|
||||
_this = createMarker ["Ovelgonne", [6156.8647, 2619.8801, -1.1444092e-005]];
|
||||
_this setMarkerText "Ovelgonne";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Ovelgonne = _this;
|
||||
|
||||
_this = createMarker ["Fuhrberg", [4671.6343, 443.48831, 9.5367432e-006]];
|
||||
_this setMarkerText "Fuhrberg";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Fuhrberg = _this;
|
||||
|
||||
_this = createMarker ["Wietze", [4672.1519, 3009.2664, 2.0980835e-005]];
|
||||
_this setMarkerText "Wietze";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Wietze = _this;
|
||||
|
||||
_this = createMarker ["Sudwinsen", [5618.9297, 3712.0496, -4.7683716e-006]];
|
||||
_this setMarkerText "Sudwinsen";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Sudwinsen = _this;
|
||||
|
||||
_this = createMarker ["Winsen", [5576.0605, 4354.6401, -9.5367432e-007]];
|
||||
_this setMarkerText "Winsen";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Winsen = _this;
|
||||
|
||||
_this = createMarker ["Wolthausen", [7112.8071, 4622.9976, -2.0980835e-005]];
|
||||
_this setMarkerText "Wolthausen";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Wolthausen = _this;
|
||||
|
||||
_this = createMarker ["Eschede", [11830.458, 5652.0806, 2.6702881e-005]];
|
||||
_this setMarkerText "Eschede";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Eschede = _this;
|
||||
|
||||
_this = createMarker ["Schuen", [9038.9385, 3837.918, -4.9591064e-005]];
|
||||
_this setMarkerText "Schuen";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Schuen = _this;
|
||||
|
||||
_this = createMarker ["NAF_Control_Tower", [11102.345, 11203.669, 8.5830688e-006]];
|
||||
_this setMarkerText "NAF_Control_Tower";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_NAF_Control_Tower = _this;
|
||||
|
||||
_this = createMarker ["Fassberg", [10436.042, 10689.137, -2.8610229e-006]];
|
||||
_this setMarkerText "Fassberg";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Fassberg = _this;
|
||||
|
||||
_this = createMarker ["Wietzendorf", [6848.2852, 11163.889, 2.6702881e-005]];
|
||||
_this setMarkerText "Wietzendorf";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Wietzendorf = _this;
|
||||
|
||||
_this = createMarker ["Dorfmark", [2984.6731, 10950.419, 1.9073486e-006]];
|
||||
_this setMarkerText "Dorfmark";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Dorfmark = _this;
|
||||
|
||||
_this = createMarker ["Benefeld", [715.7384, 11086.646, 7.6293945e-006]];
|
||||
_this setMarkerText "Benefeld";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Benefeld = _this;
|
||||
|
||||
_this = createMarker ["Fallingbostel", [1606.4475, 9430.5176, 1.9073486e-006]];
|
||||
_this setMarkerText "Fallingbostel";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Fallingbostel = _this;
|
||||
|
||||
_this = createMarker ["Dushorn", [571.11353, 8693.5762, 5.7220459e-006]];
|
||||
_this setMarkerText "Dushorn";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Dushorn = _this;
|
||||
|
||||
_this = createMarker ["Schwarmstedt", [447.49429, 3814.2073, -5.7220459e-006]];
|
||||
_this setMarkerText "Schwarmstedt";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Schwarmstedt = _this;
|
||||
|
||||
_this = createMarker ["Hademstorf", [614.74182, 5104.7773, -3.8146973e-006]];
|
||||
_this setMarkerText "Hademstorf";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Hademstorf = _this;
|
||||
|
||||
_this = createMarker ["Thoren", [2702.6433, 4069.988, -1.9073486e-006]];
|
||||
_this setMarkerText "Thoren";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Thoren = _this;
|
||||
|
||||
_this = createMarker ["Mellendorf", [2301.0278, 1215.074, -3.0517578e-005]];
|
||||
_this setMarkerText "Mellendorf";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Mellendorf = _this;
|
||||
|
||||
_this = createMarker ["Lindwedel", [1678.7277, 2053.5579, -9.5367432e-006]];
|
||||
_this setMarkerText "Lindwedel";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Lindwedel = _this;
|
||||
|
||||
_this = createMarker ["Eversen", [8469.7305, 6320.751, -3.8146973e-006]];
|
||||
_this setMarkerText "Eversen";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Eversen = _this;
|
||||
|
||||
_this = createMarker ["Beckedorf", [8414.5283, 8088.9531, 6.2942505e-005]];
|
||||
_this setMarkerText "Beckedorf";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Beckedorf = _this;
|
||||
|
||||
_this = createMarker ["Offen", [6851.1323, 6618.6309, 2.2888184e-005]];
|
||||
_this setMarkerText "Offen";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Offen = _this;
|
||||
|
||||
_this = createMarker ["Walle", [6247.1572, 5803.9072, 3.8146973e-006]];
|
||||
_this setMarkerText "Walle";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Walle = _this;
|
||||
|
||||
_this = createMarker ["Meissendorf", [4542.5371, 5519.3491, 3.8146973e-006]];
|
||||
_this setMarkerText "Meissendorf";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Meissendorf = _this;
|
||||
|
||||
_this = createMarker ["Bergen", [6760.0996, 7975.769, 5.7220459e-006]];
|
||||
_this setMarkerText "Bergen";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Bergen = _this;
|
||||
|
||||
_this = createMarker ["Bonstorf", [8349.6416, 9591.1768, 3.8146973e-005]];
|
||||
_this setMarkerText "Bonstorf";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Bonstorf = _this;
|
||||
|
||||
_this = createMarker ["Muden", [9515.9932, 10121.562, 2.4795532e-005]];
|
||||
_this setMarkerText "Muden";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Muden = _this;
|
||||
|
||||
_this = createMarker ["Hermannsburg", [9001.0996, 8901.415, -3.8146973e-005]];
|
||||
_this setMarkerText "Hermannsburg";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Hermannsburg = _this;
|
||||
|
||||
_this = createMarker ["Gross_Hehlen", [8513.2227, 3162.3447, 1.1444092e-005]];
|
||||
_this setMarkerText "Gross_Hehlen";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Gross_Hehlen = _this;
|
||||
|
||||
_this = createMarker ["Vorwerk", [9380.126, 3269.1462, 1.9073486e-006]];
|
||||
_this setMarkerText "Vorwerk";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Vorwerk = _this;
|
||||
|
||||
_this = createMarker ["Hehlentor", [9036.2773, 2586.5928, 2.8610229e-005]];
|
||||
_this setMarkerText "Hehlentor";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Hehlentor = _this;
|
||||
|
||||
_this = createMarker ["Klein_Hehlen", [8350.9766, 2752.293, 2.4795532e-005]];
|
||||
_this setMarkerText "Klein Hehlen";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Klein_Hehlen = _this;
|
||||
|
||||
_this = createMarker ["Eastmost_along_river", [12195.065, 977.573, -1.8119812e-005]];
|
||||
_this setMarkerText "Eastmost_along_river";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Eastmost_along_river = _this;
|
||||
|
||||
_this = createMarker ["Westmost_along_river", [59.358772, 5208.2036, 3.7670135e-005]];
|
||||
_this setMarkerText "Westmost_along_river";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Westmost_along_river = _this;
|
||||
|
||||
_this = createMarker ["NW_Corner", [17.684713, 12274.881, 0]];
|
||||
_this setMarkerText "NW_Corner";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_NW_Corner = _this;
|
||||
|
||||
_this = createMarker ["NE_Corner", [12186.046, 12218.783, -2.4795532e-005]];
|
||||
_this setMarkerText "NE_Corner";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_NE_Corner = _this;
|
||||
|
||||
_this = createMarker ["SE_Corner", [12213.908, 29.648508, -2.0980835e-005]];
|
||||
_this setMarkerText "SE_Corner";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_SE_Corner = _this;
|
||||
|
||||
_this = createMarker ["SW_Corner", [46.516766, 31.434532, 0]];
|
||||
_this setMarkerText "SW_Corner";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_SW_Corner = _this;
|
||||
|
||||
_this = createMarker ["Northern_point_on_Highway_7", [5035.2646, 12151.317, -6.1988831e-006]];
|
||||
_this setMarkerText "Northern_point_on_Highway_7";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Northern_point_on_Highway_7 = _this;
|
||||
|
||||
_this = createMarker ["Southern_end_of_Highway_7", [3567.832, 142.28204, 1.1444092e-005]];
|
||||
_this setMarkerText "Southern_end_of_Highway_7";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Southern_end_of_Highway_7 = _this;
|
||||
|
||||
_this = createMarker ["Highway_7_Bridge", [1594.113, 4385.8452, 0]];
|
||||
_this setMarkerText "Highway_7_Bridge";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Highway_7_Bridge = _this;
|
||||
|
||||
_this = createMarker ["Wasteland", [4421.6313, 8189.4146, -5.3405762e-005]];
|
||||
_this setMarkerText "Wasteland";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [1300, 1300];
|
||||
Manatee_Wasteland = _this;
|
||||
|
||||
_this = createMarker ["SAF_Hangars", [7556.9375, 1502.7905, 0]];
|
||||
_this setMarkerText "SAF_Hangars";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_SAF_Hangars = _this;
|
||||
|
||||
_this = createMarker ["Schuen_Military_Base", [9185.0029, 4135.4775, 0]];
|
||||
_this setMarkerText "Schuen_Military_Base";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_Schuen_Military_Base = _this;
|
||||
|
||||
_this = createMarker ["NAF_Barracks", [10483.776, 11535.362, 0]];
|
||||
_this setMarkerText "NAF_Barracks";
|
||||
_this setMarkerShape "ELLIPSE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 300];
|
||||
Manatee_NAF_Barracks = _this;
|
||||
|
||||
_this = createMarker ["South_East_Quadrant", [9427.334, 3538.8962, 0]];
|
||||
_this setMarkerText "South_East_Quadrant";
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [3500, 3500];
|
||||
Manatee_South_East_Quadrant = _this;
|
||||
|
||||
_this = createMarker ["North_East_Quadrant", [9427.752, 9693.2197, 0]];
|
||||
_this setMarkerText "North_East_Quadrant";
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [3500, 3500];
|
||||
Manatee_North_East_Quadrant = _this;
|
||||
|
||||
_this = createMarker ["South_West_Quadrant", [3027.6523, 3293.8015, 0]];
|
||||
_this setMarkerText "South_West_Quadrant";
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [3500, 3500];
|
||||
Manatee_South_West_Quadrant = _this;
|
||||
|
||||
_this = createMarker ["North_West_Quadrant", [2972.1943, 9165.0508, -1.7166138e-005]];
|
||||
_this setMarkerText "North_West_Quadrant";
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [3500, 3500];
|
||||
Manatee_North_West_Quadrant = _this;
|
||||
|
||||
_this = createMarker ["Map_Center", [6070.0127, 6405.2798, -3.4332275e-005]];
|
||||
_this setMarkerText "Map_Center";
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [7000, 7000];
|
||||
Manatee_Map_Center = _this;
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
// End of area marker definition section
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
diag_log format["SAR_AI: Area & Trigger definition finalized"];
|
||||
diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"];
|
||||
|
||||
//
|
||||
// Static, predefined heli patrol areas with configurable units
|
||||
//
|
||||
// Parameters used:
|
||||
// Areaname
|
||||
// 1,2,3 = soldier, survivors, bandits
|
||||
//
|
||||
|
||||
// Map Center - Soldiers
|
||||
[Manatee_Map_Center,1] call SAR_AI_heli;
|
||||
// North Western Bandits
|
||||
[Manatee_North_West_Quadrant,3] call SAR_AI_heli;
|
||||
// North Eastern Bandits
|
||||
[Manatee_North_East_Quadrant,3] call SAR_AI_heli;
|
||||
// South Eastern Survivors
|
||||
[Manatee_South_East_Quadrant,2] call SAR_AI_heli;
|
||||
// South Western Survivors
|
||||
[Manatee_South_West_Quadrant,2] call SAR_AI_heli;
|
||||
|
||||
// add if needed, see examples in the chernarus file
|
||||
|
||||
diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// Static, predefined infantry patrols in defined areas with configurable units
|
||||
//---------------------------------------------------------------------------------
|
||||
// Example: [SAR_area_DEBUG,1,0,1,""] call SAR_AI;
|
||||
//
|
||||
// SAR_area_DEBUG = areaname (must have been defined further up)
|
||||
// 1 = type of group (1 = soldiers, 2 = survivors, 3 = bandits)
|
||||
// 0 = amount of snipers in the group
|
||||
// 1 = amount of rifleman in the group
|
||||
//
|
||||
//
|
||||
|
||||
// BANDITS - 3 Snipers, 7 rifleman. SAF & NAF
|
||||
[Manatee_SAF_Control_Tower,3,3,7,""] call SAR_AI;
|
||||
|
||||
[Manatee_NAF_Control_Tower,3,3,7,""] call SAR_AI;
|
||||
|
||||
|
||||
|
||||
// Example entries:
|
||||
// SARGE DEBUG - Debug group
|
||||
// military, 0 snipers, 1 riflemen, patrol
|
||||
//[SAR_area_DEBUG,1,0,1,""] call SAR_AI;
|
||||
|
||||
// military, 2 snipers, 4 riflemen, patrol
|
||||
//[SAR_area_DEBUG,1,2,4,""] call SAR_AI;
|
||||
|
||||
// survivors, 1 snipers, 3 riflemen, patrolling the NWAF
|
||||
//[SAR_marker_helipatrol_nwaf,2,1,3,""] call SAR_AI;
|
||||
|
||||
// bandits, 5 snipers, 2 riflemen, patrolling the NWAF
|
||||
//[SAR_marker_helipatrol_nwaf,3,5,2,""] call SAR_AI;
|
||||
//---------------------------------------------------------------------------------
|
||||
|
||||
// add here if needed
|
||||
|
||||
|
||||
|
||||
|
||||
// ---- end of configuration area ----
|
||||
|
||||
diag_log format["SAR_AI: Static Spawning for infantry patrols finished"];
|
||||
};
|
@ -1,145 +0,0 @@
|
||||
/*
|
||||
IMPORTANT: The grid squares are named like : SAR_area_0_0
|
||||
|
||||
where the first 0 is the x counter, and the second 0 the y counter.
|
||||
|
||||
So to adress the bottom left square in the grid, you use SAR_area_0_0.
|
||||
The square above that one would be: SAR_area_0_1
|
||||
the square one to the right of the bottom left square is SAR_area_1_0
|
||||
|
||||
You want to change the number arrays in the below lines:
|
||||
|
||||
The order for these numbers is always [BANDIT, SURVIVOR, SOLDIER]
|
||||
|
||||
Lets take an example for Chernarus
|
||||
|
||||
// Kamenka, 0 bandit groups, 1 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,1,2],[0,75,100],[0,4,3]],"SAR_area_0_0"] call SAR_AI_mon_upd;
|
||||
|
||||
[[0,1,2],[0,75,100],[0,4,3]]
|
||||
|
||||
the first set of numbers : 0,1,2
|
||||
stands for
|
||||
0 bandit groups
|
||||
1 soldier group
|
||||
2 surivors groups
|
||||
thats the max that can spawn in this grid
|
||||
|
||||
the second set of numbers : 0,75,100
|
||||
that means:
|
||||
0% probability to spawn bandit groups
|
||||
75% for soldiers
|
||||
100% for survivors
|
||||
|
||||
the last set of numbers : 0,4,3
|
||||
thats the maximum number of ppl in the group (plus 1 leader)
|
||||
0 bandits
|
||||
max 4 (+1 leader) soldiers
|
||||
max 3 (+1 leader) survivors
|
||||
this number is randomized
|
||||
*/
|
||||
//
|
||||
// grid definition for the automatic spawn system
|
||||
//
|
||||
_type = _this select 0;
|
||||
|
||||
// grid definition for the automatic spawn system
|
||||
if ((_type == "dynamic") && SAR_dynamic_spawning) then {
|
||||
|
||||
/* // West Point, 2 bandit groups, 1 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,1,2],[50,75,100],[2,3,3]],"SAR_area_0_0"] call SAR_AI_mon_upd;
|
||||
|
||||
// Water, 0 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_0_3"] call SAR_AI_mon_upd;
|
||||
|
||||
// Brensk, 3 bandit groups, 1 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[3,1,1],[80,50,75],[2,2,3]],"SAR_area_1_0"] call SAR_AI_mon_upd;
|
||||
|
||||
// Tara Bridge, 2 bandit groups, 0 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,0,2],[70,0,70],[3,0,3]],"SAR_area_2_0"] call SAR_AI_mon_upd;
|
||||
|
||||
// South East coast, 1 bandit groups, 1 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,3],[30,20,60],[2,2,3]],"SAR_area_3_0"] call SAR_AI_mon_upd;
|
||||
|
||||
// Lubjansk, 1 bandit groups, 0 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,0,3],[50,0,75],[2,0,4]],"SAR_area_1_3"] call SAR_AI_mon_upd;
|
||||
|
||||
// Sebjan airport, 2 bandit groups, 2 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,2,1],[50,50,30],[3,3,2]],"SAR_area_2_2"] call SAR_AI_mon_upd;
|
||||
|
||||
// Norinsk, 2 bandit groups, 3 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,3,1],[75,75,50],[3,3,3]],"SAR_area_1_1"] call SAR_AI_mon_upd;
|
||||
|
||||
// Object A1, 2 bandit groups, 1 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,1,2],[80,75,75],[2,2,4]],"SAR_area_1_2"] call SAR_AI_mon_upd;
|
||||
|
||||
// Jalovisko, 2 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,0,3],[20,0,50],[3,0,3]],"SAR_area_3_3"] call SAR_AI_mon_upd;
|
||||
|
||||
// Tara, 2 bandit groups, 0 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,0,2],[75,0,75],[3,0,3]],"SAR_area_2_1"] call SAR_AI_mon_upd;
|
||||
}; */
|
||||
|
||||
if (_type == "static") then {
|
||||
// ---------------------------------------------------------------
|
||||
// Definition of area markers for static spawns
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
// add if needed, see examples in the chernarus file
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
// End of area marker definition section
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
diag_log format["SAR_AI: Area & Trigger definition finalized"];
|
||||
diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"];
|
||||
|
||||
//
|
||||
// Static, predefined heli patrol areas with configurable units
|
||||
//
|
||||
// Parameters used:
|
||||
// Areaname
|
||||
// 1,2,3 = soldier, survivors, bandits
|
||||
//
|
||||
|
||||
// add if needed, see examples in the chernarus file
|
||||
|
||||
diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// Static, predefined infantry patrols in defined areas with configurable units
|
||||
//---------------------------------------------------------------------------------
|
||||
// Example: [SAR_area_DEBUG,1,0,1,""] call SAR_AI;
|
||||
//
|
||||
// SAR_area_DEBUG = areaname (must have been defined further up)
|
||||
// 1 = type of group (1 = soldiers, 2 = survivors, 3 = bandits)
|
||||
// 0 = amount of snipers in the group
|
||||
// 1 = amount of rifleman in the group
|
||||
//
|
||||
//
|
||||
|
||||
// Example entries:
|
||||
// SARGE DEBUG - Debug group
|
||||
// military, 0 snipers, 1 riflemen, patrol
|
||||
//[SAR_area_DEBUG,1,0,1,""] call SAR_AI;
|
||||
|
||||
// military, 2 snipers, 4 riflemen, patrol
|
||||
//[SAR_area_DEBUG,1,2,4,""] call SAR_AI;
|
||||
|
||||
// survivors, 1 snipers, 3 riflemen, patrolling the NWAF
|
||||
//[SAR_marker_helipatrol_nwaf,2,1,3,""] call SAR_AI;
|
||||
|
||||
// bandits, 5 snipers, 2 riflemen, patrolling the NWAF
|
||||
//[SAR_marker_helipatrol_nwaf,3,5,2,""] call SAR_AI;
|
||||
//---------------------------------------------------------------------------------
|
||||
|
||||
// add here if needed
|
||||
|
||||
|
||||
|
||||
|
||||
// ---- end of configuration area ----
|
||||
|
||||
diag_log format["SAR_AI: Static Spawning for infantry patrols finished"];
|
||||
};
|
@ -1,117 +0,0 @@
|
||||
/*
|
||||
IMPORTANT: The grid squares are named like : SAR_area_0_0
|
||||
|
||||
where the first 0 is the x counter, and the second 0 the y counter.
|
||||
|
||||
So to adress the bottom left square in the grid, you use SAR_area_0_0.
|
||||
The square above that one would be: SAR_area_0_1
|
||||
the square one to the right of the bottom left square is SAR_area_1_0
|
||||
|
||||
You want to change the number arrays in the below lines:
|
||||
|
||||
The order for these numbers is always [BANDIT, SURVIVOR, SOLDIER]
|
||||
|
||||
Lets take an example for Chernarus
|
||||
|
||||
// Kamenka, 0 bandit groups, 1 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,1,2],[0,75,100],[0,4,3]],"SAR_area_0_0"] call SAR_AI_mon_upd;
|
||||
|
||||
[[0,1,2],[0,75,100],[0,4,3]]
|
||||
|
||||
the first set of numbers : 0,1,2
|
||||
stands for
|
||||
0 bandit groups
|
||||
1 soldier group
|
||||
2 surivors groups
|
||||
thats the max that can spawn in this grid
|
||||
|
||||
the second set of numbers : 0,75,100
|
||||
that means:
|
||||
0% probability to spawn bandit groups
|
||||
75% for soldiers
|
||||
100% for survivors
|
||||
|
||||
the last set of numbers : 0,4,3
|
||||
thats the maximum number of ppl in the group (plus 1 leader)
|
||||
0 bandits
|
||||
max 4 (+1 leader) soldiers
|
||||
max 3 (+1 leader) survivors
|
||||
this number is randomized
|
||||
*/
|
||||
// --------------------------------------------------
|
||||
// grid definition for the automatic spawn system
|
||||
//
|
||||
// examples see the chernarus file
|
||||
// --------------------------------------------------
|
||||
_type = _this select 0;
|
||||
|
||||
// grid definition for the automatic spawn system
|
||||
if ((_type == "dynamic") && SAR_dynamic_spawning) then {
|
||||
|
||||
// add entries here ...
|
||||
|
||||
};
|
||||
|
||||
if (_type == "static") then {
|
||||
// ---------------------------------------------------------------
|
||||
// Definition of area markers for static spawns
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
// add if needed, see examples in the chernarus file
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
// End of area marker definition section
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
diag_log format["SAR_AI: Area & Trigger definition finalized"];
|
||||
diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"];
|
||||
|
||||
//
|
||||
// Static, predefined heli patrol areas with configurable units
|
||||
//
|
||||
// Parameters used:
|
||||
// Areaname
|
||||
// 1,2,3 = soldier, survivors, bandits
|
||||
//
|
||||
|
||||
// add if needed, see examples in the chernarus file
|
||||
|
||||
diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// Static, predefined infantry patrols in defined areas with configurable units
|
||||
//---------------------------------------------------------------------------------
|
||||
// Example: [SAR_area_DEBUG,1,0,1,""] call SAR_AI;
|
||||
//
|
||||
// SAR_area_DEBUG = areaname (must have been defined further up)
|
||||
// 1 = type of group (1 = soldiers, 2 = survivors, 3 = bandits)
|
||||
// 0 = amount of snipers in the group
|
||||
// 1 = amount of rifleman in the group
|
||||
//
|
||||
//
|
||||
|
||||
// Example entries:
|
||||
// SARGE DEBUG - Debug group
|
||||
// military, 0 snipers, 1 riflemen, patrol
|
||||
//[SAR_area_DEBUG,1,0,1,""] call SAR_AI;
|
||||
|
||||
// military, 2 snipers, 4 riflemen, patrol
|
||||
//[SAR_area_DEBUG,1,2,4,""] call SAR_AI;
|
||||
|
||||
// survivors, 1 snipers, 3 riflemen, patrolling the NWAF
|
||||
//[SAR_marker_helipatrol_nwaf,2,1,3,""] call SAR_AI;
|
||||
|
||||
// bandits, 5 snipers, 2 riflemen, patrolling the NWAF
|
||||
//[SAR_marker_helipatrol_nwaf,3,5,2,""] call SAR_AI;
|
||||
//---------------------------------------------------------------------------------
|
||||
|
||||
// add here if needed
|
||||
|
||||
|
||||
|
||||
|
||||
// ---- end of configuration area ----
|
||||
|
||||
diag_log format["SAR_AI: Static Spawning for infantry patrols finished"];
|
||||
};
|
@ -1,117 +0,0 @@
|
||||
/*
|
||||
IMPORTANT: The grid squares are named like : SAR_area_0_0
|
||||
|
||||
where the first 0 is the x counter, and the second 0 the y counter.
|
||||
|
||||
So to adress the bottom left square in the grid, you use SAR_area_0_0.
|
||||
The square above that one would be: SAR_area_0_1
|
||||
the square one to the right of the bottom left square is SAR_area_1_0
|
||||
|
||||
You want to change the number arrays in the below lines:
|
||||
|
||||
The order for these numbers is always [BANDIT, SURVIVOR, SOLDIER]
|
||||
|
||||
Lets take an example for Chernarus
|
||||
|
||||
// Kamenka, 0 bandit groups, 1 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,1,2],[0,75,100],[0,4,3]],"SAR_area_0_0"] call SAR_AI_mon_upd;
|
||||
|
||||
[[0,1,2],[0,75,100],[0,4,3]]
|
||||
|
||||
the first set of numbers : 0,1,2
|
||||
stands for
|
||||
0 bandit groups
|
||||
1 soldier group
|
||||
2 surivors groups
|
||||
thats the max that can spawn in this grid
|
||||
|
||||
the second set of numbers : 0,75,100
|
||||
that means:
|
||||
0% probability to spawn bandit groups
|
||||
75% for soldiers
|
||||
100% for survivors
|
||||
|
||||
the last set of numbers : 0,4,3
|
||||
thats the maximum number of ppl in the group (plus 1 leader)
|
||||
0 bandits
|
||||
max 4 (+1 leader) soldiers
|
||||
max 3 (+1 leader) survivors
|
||||
this number is randomized
|
||||
*/
|
||||
// --------------------------------------------------
|
||||
// grid definition for the automatic spawn system
|
||||
//
|
||||
// examples see the chernarus file
|
||||
// --------------------------------------------------
|
||||
|
||||
_type = _this select 0;
|
||||
|
||||
// grid definition for the automatic spawn system
|
||||
if ((_type == "dynamic") && SAR_dynamic_spawning) then {
|
||||
// add entries here ...
|
||||
|
||||
};
|
||||
|
||||
if (_type == "static") then {
|
||||
// ---------------------------------------------------------------
|
||||
// Definition of area markers for static spawns
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
// add if needed, see examples in the chernarus file
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
// End of area marker definition section
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
diag_log format["SAR_AI: Area & Trigger definition finalized"];
|
||||
diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"];
|
||||
|
||||
//
|
||||
// Static, predefined heli patrol areas with configurable units
|
||||
//
|
||||
// Parameters used:
|
||||
// Areaname
|
||||
// 1,2,3 = soldier, survivors, bandits
|
||||
//
|
||||
|
||||
// add if needed, see examples in the chernarus file
|
||||
|
||||
diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// Static, predefined infantry patrols in defined areas with configurable units
|
||||
//---------------------------------------------------------------------------------
|
||||
// Example: [SAR_area_DEBUG,1,0,1,""] call SAR_AI;
|
||||
//
|
||||
// SAR_area_DEBUG = areaname (must have been defined further up)
|
||||
// 1 = type of group (1 = soldiers, 2 = survivors, 3 = bandits)
|
||||
// 0 = amount of snipers in the group
|
||||
// 1 = amount of rifleman in the group
|
||||
//
|
||||
//
|
||||
|
||||
// Example entries:
|
||||
// SARGE DEBUG - Debug group
|
||||
// military, 0 snipers, 1 riflemen, patrol
|
||||
//[SAR_area_DEBUG,1,0,1,""] call SAR_AI;
|
||||
|
||||
// military, 2 snipers, 4 riflemen, patrol
|
||||
//[SAR_area_DEBUG,1,2,4,""] call SAR_AI;
|
||||
|
||||
// survivors, 1 snipers, 3 riflemen, patrolling the NWAF
|
||||
//[SAR_marker_helipatrol_nwaf,2,1,3,""] call SAR_AI;
|
||||
|
||||
// bandits, 5 snipers, 2 riflemen, patrolling the NWAF
|
||||
//[SAR_marker_helipatrol_nwaf,3,5,2,""] call SAR_AI;
|
||||
//---------------------------------------------------------------------------------
|
||||
|
||||
// add here if needed
|
||||
|
||||
|
||||
|
||||
|
||||
// ---- end of configuration area ----
|
||||
|
||||
diag_log format["SAR_AI: Static Spawning for infantry patrols finished"];
|
||||
};
|
@ -1,284 +0,0 @@
|
||||
/*
|
||||
IMPORTANT: The grid squares are named like : SAR_area_0_0
|
||||
|
||||
where the first 0 is the x counter, and the second 0 the y counter.
|
||||
|
||||
So to adress the bottom left square in the grid, you use SAR_area_0_0.
|
||||
The square above that one would be: SAR_area_0_1
|
||||
the square one to the right of the bottom left square is SAR_area_1_0
|
||||
|
||||
You want to change the number arrays in the below lines:
|
||||
|
||||
The order for these numbers is always [BANDIT, SURVIVOR, SOLDIER]
|
||||
|
||||
Lets take an example for Chernarus
|
||||
|
||||
// Kamenka, 0 bandit groups, 1 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,1,2],[0,75,100],[0,4,3]],"SAR_area_0_0"] call SAR_AI_mon_upd;
|
||||
|
||||
[[0,1,2],[0,75,100],[0,4,3]]
|
||||
|
||||
the first set of numbers : 0,1,2
|
||||
stands for
|
||||
0 bandit groups
|
||||
1 soldier group
|
||||
2 surivors groups
|
||||
thats the max that can spawn in this grid
|
||||
|
||||
the second set of numbers : 0,75,100
|
||||
that means:
|
||||
0% probability to spawn bandit groups
|
||||
75% for soldiers
|
||||
100% for survivors
|
||||
|
||||
the last set of numbers : 0,4,3
|
||||
thats the maximum number of ppl in the group (plus 1 leader)
|
||||
0 bandits
|
||||
max 4 (+1 leader) soldiers
|
||||
max 3 (+1 leader) survivors
|
||||
this number is randomized
|
||||
*/
|
||||
|
||||
_type = _this select 0;
|
||||
|
||||
// grid definition for the automatic spawn system
|
||||
if ((_type == "dynamic") && SAR_dynamic_spawning) then {
|
||||
|
||||
diag_log format["SAR_AI: Dynamic spawning definition / adjustments started"];
|
||||
|
||||
// Blacklist Safezones using 0s
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_3_6"] call SAR_AI_mon_upd;
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_10_6"] call SAR_AI_mon_upd;
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_9_9"] call SAR_AI_mon_upd;
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_4_9"] call SAR_AI_mon_upd;
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_5_9"] call SAR_AI_mon_upd;
|
||||
[["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_10_10"] call SAR_AI_mon_upd;
|
||||
|
||||
diag_log format["SAR_AI: Dynamic spawning definition / adjustments finished"];
|
||||
};
|
||||
|
||||
if (_type == "static") then {
|
||||
// Definition of area markers for static spawns
|
||||
diag_log format["SAR_AI: Static spawning area definition started"];
|
||||
|
||||
// soutcoast, heli patrol area
|
||||
_this = createMarker ["SAR_marker_helipatrol_southcoast", [7997.2837, 2687.6707]];
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [6500, 1200];
|
||||
SAR_marker_helipatrol_southcoast = _this;
|
||||
|
||||
// eastcoast, heli patrol area
|
||||
_this = createMarker ["SAR_marker_helipatrol_eastcoast", [13304.196, 8220.9795]];
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [1200, 6000];
|
||||
SAR_marker_helipatrol_eastcoast = _this;
|
||||
|
||||
// NWAF, heli patrol area
|
||||
_this = createMarker ["SAR_marker_helipatrol_nwaf", [4525.3335, 10292.299]];
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [1500, 500];
|
||||
_this setMarkerDir 59.354115;
|
||||
SAR_marker_helipatrol_nwaf = _this;
|
||||
|
||||
// NEAF, heli patrol area
|
||||
_this = createMarker ["SAR_marker_helipatrol_neaf", [12034.16, 12725.376, 0]];
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [1000, 600];
|
||||
SAR_marker_helipatrol_neaf = _this;
|
||||
|
||||
|
||||
_this = createMarker ["SAR_marker_DEBUG_veh", [11514.385,11679.752]];
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [300, 1000];
|
||||
_this setMarkerDir -19.085985;
|
||||
SAR_marker_DEBUG_veh = _this;
|
||||
|
||||
_this = createMarker ["SAR_marker_DEBUG_devilscastle", [6913.47,11437.2,0.001]];
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [10, 10];
|
||||
SAR_marker_DEBUG_devilscastle = _this;
|
||||
|
||||
diag_log format["SAR_AI: Static spawning area definition finished"];
|
||||
// ----------------------------------------------------------------------------------------
|
||||
// End of area marker definition section
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// Static, predefined heli patrol areas with configurable units
|
||||
//---------------------------------------------------------------------------------
|
||||
//
|
||||
// format: [areamarker,type_of_group,(respawn),(respawntime)] call SAR_AI;
|
||||
//
|
||||
// areamarker : Name of an area, as defined in your area definitions (MUST NOT BE similar to SAR_area_ ! THIS IS IMPORTANT!)
|
||||
// type_of_group : 1 = military, 2 = survivors, 3 = bandits
|
||||
//
|
||||
// respawn : true or false (optional)
|
||||
// respawntime : time in secs until group respawns (optional)
|
||||
// air_vehicle_type : classnema of the air vehicle you want to use
|
||||
//
|
||||
//
|
||||
// Note: The crew will be automatically seized to man any available gun in the airplane / heli.
|
||||
//
|
||||
// Examples:
|
||||
//
|
||||
// A) military air group patrolling, respawning, respawn time = default configured time, using default randomized vehicles
|
||||
//
|
||||
// [SAR_marker_DEBUG,1,true] call SAR_AI_heli;
|
||||
//
|
||||
// B) bandit air group patrolling, not respawning,
|
||||
//
|
||||
// [SAR_marker_DEBUG,3] call SAR_AI_heli;
|
||||
//
|
||||
// C) survivor air group patrolling, respawning, respawn time = 120 seconds
|
||||
//
|
||||
// [SAR_marker_DEBUG,true,120] call SAR_AI_heli;
|
||||
//
|
||||
//---------------------------------------------------------------------------------
|
||||
diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"];
|
||||
|
||||
// define your static air patrols here
|
||||
/*
|
||||
//Heli Patrol NWAF
|
||||
[SAR_marker_DEBUG_veh,1,true] call SAR_AI_heli;
|
||||
|
||||
//Heli Patrol NEAF
|
||||
[SAR_marker_DEBUG_veh,1,true] call SAR_AI_heli;
|
||||
|
||||
// Heli patrol south coast
|
||||
[SAR_marker_DEBUG_veh,1,true] call SAR_AI_heli;
|
||||
[SAR_marker_DEBUG_veh,1,true] call SAR_AI_heli;
|
||||
|
||||
// heli patrol east coast
|
||||
[SAR_marker_DEBUG_veh,1,true] call SAR_AI_heli;
|
||||
[SAR_marker_DEBUG_veh,1,true] call SAR_AI_heli;
|
||||
*/
|
||||
// example war scenario in the northwest. Comment OUT after having had a look at it!
|
||||
/* [SAR_marker_DEBUG_veh,1,true,30] call SAR_AI_heli;
|
||||
[SAR_marker_DEBUG_veh,1,true,30] call SAR_AI_heli;
|
||||
[SAR_marker_DEBUG_veh,3,true,30] call SAR_AI_heli;
|
||||
[SAR_marker_DEBUG_veh,3,true,30] call SAR_AI_heli; */
|
||||
|
||||
|
||||
diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
|
||||
//---------------------------------------------------------------------------------
|
||||
// Static, predefined infantry patrols in defined areas with configurable units
|
||||
//---------------------------------------------------------------------------------
|
||||
//
|
||||
// format: [areamarker,type_of_group,number_of_snipers,number_of_riflemen,action_to_do,(respawn),(respawntime)] call SAR_AI;
|
||||
//
|
||||
// areamarker : Name of an area, as defined in your area definitions (MUST NOT BE similar to SAR_area_ ! THIS IS IMPORTANT!)
|
||||
// type_of_group : 1 = military, 2 = survivors, 3 = bandits
|
||||
// number_of_snipers : amount of snipers in the group
|
||||
// number_of_riflemen : amount of riflemen in the group
|
||||
//
|
||||
// action_to_do : groupaction (optional, default is "patrol")
|
||||
// possible values:
|
||||
// "fortify" -> the group will search for nearby buildings and move in them. They will stay there until an enemy spotted, then they will chase him.
|
||||
// "ambush" -> the group will look for a nearby road, and setup an ambush. They will not move until an enemy was spotted.
|
||||
// "patrol" -> the group will patrol random waypoints in the area, and engage any enemy they see.
|
||||
//
|
||||
// respawn : true or false (optional)
|
||||
// respawntime : time in secs until group respawns (optional)
|
||||
//
|
||||
// Examples:
|
||||
//
|
||||
// A) military group patrolling, with 1 leader and 1 rifleman, respawning, respawn time = default configured time
|
||||
//
|
||||
// [SAR_marker_DEBUG,1,0,1,"patrol",true] call SAR_AI;
|
||||
//
|
||||
// B) bandit group patrolling, with 1 leader, 2 snipers and 1 rifleman, respawning, respawn time = 30 seconds
|
||||
//
|
||||
// [SAR_marker_DEBUG,3,2,1,"patrol",true,30] call SAR_AI;
|
||||
//
|
||||
// C) survivor group fortifying, with 1 leader, 1 sniper and 3 riflemen, not respawning
|
||||
//
|
||||
// [SAR_marker_DEBUG,2,1,3,"fortify",false] call SAR_AI;
|
||||
//
|
||||
//---------------------------------------------------------------------------------
|
||||
diag_log format["SAR_AI: Static Spawning for infantry patrols started"];
|
||||
|
||||
// define your static infantry patrols here
|
||||
|
||||
/* [SAR_marker_DEBUG_devilscastle,1,0,6,"fortify",true] call SAR_AI; */
|
||||
|
||||
// example war scenario in the northwest. Comment OUT after having had a look at it!
|
||||
/* [SAR_marker_DEBUG_veh,1,0,9,"patrol",true] call SAR_AI;
|
||||
[SAR_marker_DEBUG_veh,2,0,9,"patrol",true] call SAR_AI;
|
||||
[SAR_marker_DEBUG_veh,3,0,9,"patrol",true] call SAR_AI;
|
||||
[SAR_marker_DEBUG_veh,3,0,9,"patrol",true] call SAR_AI; */
|
||||
|
||||
diag_log format["SAR_AI: Static Spawning for infantry patrols finished"];
|
||||
// -------------------------------------------------------------------------------------
|
||||
//
|
||||
// Static spawns for vehicle groups
|
||||
//
|
||||
// format: [areamarker,type_of_group,vehicle array,crew array,(respawn),(respawntime)] call SAR_AI_land;
|
||||
//
|
||||
//
|
||||
// areamarker : Name of an area, as defined in your area definitions
|
||||
// type_of_group : 1 = military, 2 = survivors, 3 = bandits
|
||||
// vehicle array : e.g. ["car1"], MUST be enclosed by [], and MUST be valid vehicle classnames. multiple vehicles are possible, like this: ["car1","car1","car1"]
|
||||
// crew array : e.g. [[1,2,3]] -> the first entry in the array element sets if the leader travels in that vehicle, the second is the number of snipers in the vehicle, the third is the number of riflemen.
|
||||
// must match to the number of defined vehicles, so for the above example, you need: [[1,2,3],[0,1,2],[0,1,1]]
|
||||
//
|
||||
//
|
||||
// respawn : true or false (optional)
|
||||
// respawntime : time in secs until group respawns (optional)
|
||||
//
|
||||
//
|
||||
//
|
||||
// Examples:
|
||||
//
|
||||
// A) This will spawn an AI group with 1 vehicle(UAZ), and 3 AI in it
|
||||
/*
|
||||
[
|
||||
SAR_marker_DEBUG_veh_1, // Name of the area that the vehicle patrol will spawn in
|
||||
1, // type of group
|
||||
["UAZ_Unarmed_TK_EP1"], // used vehicles
|
||||
[[1,1,1]], // Vehicle initial crew
|
||||
false // if this group should respawn or not
|
||||
] call SAR_AI_land;
|
||||
*/
|
||||
//
|
||||
// B) This will spawn an AI group with 1 vehicle, 3 AI in the UAZ, and this group will respawn after 60 seconds
|
||||
/*
|
||||
[
|
||||
SAR_marker_DEBUG_veh_1, // Name of the area that the vehicle patrol will spawn in
|
||||
1, // type of group
|
||||
["UAZ_Unarmed_TK_EP1"], // used vehicle
|
||||
[[1,1,1]], // Vehicle initial crews
|
||||
true, // if this group should respawn or not
|
||||
60 // waittime until this group will respawn
|
||||
] call SAR_AI_land;
|
||||
*/
|
||||
//
|
||||
// -------------------------------------------------------------------------------------
|
||||
diag_log format["SAR_AI: Static Spawning for vehicle patrols started"];
|
||||
|
||||
// define your static vehicle patrols here
|
||||
/* [SAR_marker_DEBUG_veh,1,["SUV_Base"],[[1,1,1]],true,60] call SAR_AI_land;
|
||||
[SAR_marker_DEBUG_veh,2,["SUV_Base"],[[1,1,1]],true,60] call SAR_AI_land;
|
||||
[SAR_marker_DEBUG_veh,3,["SUV_Base"],[[1,1,1]],true,60] call SAR_AI_land; */
|
||||
|
||||
diag_log format["SAR_AI: Static Spawning for vehicle patrols finished"];
|
||||
// ---- end of configuration area ----
|
||||
};
|
@ -1,320 +0,0 @@
|
||||
/*
|
||||
IMPORTANT: The grid squares are named like : SAR_area_0_0
|
||||
|
||||
where the first 0 is the x counter, and the second 0 the y counter.
|
||||
|
||||
So to adress the bottom left square in the grid, you use SAR_area_0_0.
|
||||
The square above that one would be: SAR_area_0_1
|
||||
the square one to the right of the bottom left square is SAR_area_1_0
|
||||
|
||||
You want to change the number arrays in the below lines:
|
||||
|
||||
The order for these numbers is always [BANDIT, SURVIVOR, SOLDIER]
|
||||
|
||||
Lets take an example for Chernarus
|
||||
|
||||
// Kamenka, 0 bandit groups, 1 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,1,2],[0,75,100],[0,4,3]],"SAR_area_0_0"] call SAR_AI_mon_upd;
|
||||
|
||||
[[0,1,2],[0,75,100],[0,4,3]]
|
||||
|
||||
the first set of numbers : 0,1,2
|
||||
stands for
|
||||
0 bandit groups
|
||||
1 soldier group
|
||||
2 surivors groups
|
||||
thats the max that can spawn in this grid
|
||||
|
||||
the second set of numbers : 0,75,100
|
||||
that means:
|
||||
0% probability to spawn bandit groups
|
||||
75% for soldiers
|
||||
100% for survivors
|
||||
|
||||
the last set of numbers : 0,4,3
|
||||
thats the maximum number of ppl in the group (plus 1 leader)
|
||||
0 bandits
|
||||
max 4 (+1 leader) soldiers
|
||||
max 3 (+1 leader) survivors
|
||||
this number is randomized
|
||||
*/
|
||||
// --------------------------------------------------
|
||||
// grid definition for the automatic spawn system
|
||||
//
|
||||
// examples see the chernarus file
|
||||
// --------------------------------------------------
|
||||
|
||||
_type = _this select 0;
|
||||
|
||||
// grid definition for the automatic spawn system
|
||||
if ((_type == "dynamic") && SAR_dynamic_spawning) then {
|
||||
|
||||
// KNIN, 0 bandit groups, 2 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,2,1],[0,75,100],[0,4,3]],"SAR_area_0_0"] call SAR_AI_mon_upd;
|
||||
|
||||
// ASH, 0 bandit groups, 0 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,1],[0,0,80],[0,0,3]],"SAR_area_1_0"] call SAR_AI_mon_upd;
|
||||
|
||||
// TOPOLKA, 2 bandit groups, 0 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,0,3],[75,0,75],[4,0,4]],"SAR_area_2_0"] call SAR_AI_mon_upd;
|
||||
|
||||
// SEVEN, 1 bandit groups, 0 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,0,3],[50,0,50],[4,0,2]],"SAR_area_3_0"] call SAR_AI_mon_upd;
|
||||
|
||||
// WATER, 0 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_4_0"] call SAR_AI_mon_upd;
|
||||
|
||||
// WATER, 0 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_5_0"] call SAR_AI_mon_upd;
|
||||
|
||||
// WATER, 0 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,1],[0,0,0],[0,0,0]],"SAR_area_0_1"] call SAR_AI_mon_upd;
|
||||
|
||||
// LES SPICAK, 1 bandit groups, 0 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,0,2],[80,0,60],[2,0,2]],"SAR_area_1_1"] call SAR_AI_mon_upd;
|
||||
|
||||
// BRANIBOR, 3 bandit groups, 1 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[3,1,3],[60,50,75],[2,3,3]],"SAR_area_2_1"] call SAR_AI_mon_upd;
|
||||
|
||||
// WATER, 0 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_3_1"] call SAR_AI_mon_upd;
|
||||
|
||||
// OTOK, 1 bandit groups, 1 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[75,50,75],[3,2,3]],"SAR_area_4_1"] call SAR_AI_mon_upd;
|
||||
|
||||
// NIZHINA, 0 bandit groups, 3 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,3,3],[0,50,75],[0,2,4]],"SAR_area_5_1"] call SAR_AI_mon_upd;
|
||||
|
||||
// MITROVICE, 2 bandit groups, 2 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,2,1],[90,50,75],[4,2,4]],"SAR_area_0_2"] call SAR_AI_mon_upd;
|
||||
|
||||
// BILGRAD, 3 bandit groups, 1 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[3,1,3],[50,50,50],[3,3,3]],"SAR_area_1_2"] call SAR_AI_mon_upd;
|
||||
|
||||
// KRASNOZNAMENSK, 2 bandit groups, 3 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,3,1],[75,50,75],[3,4,4]],"SAR_area_2_2"] call SAR_AI_mon_upd;
|
||||
|
||||
// BRIDGE, 1 bandit groups, 2 soldier groups, 3 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,2,3],[75,100,75],[3,3,2]],"SAR_area_3_2"] call SAR_AI_mon_upd;
|
||||
|
||||
// BOYE, 0 bandit groups, 0 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,2],[0,0,100],[0,0,5]],"SAR_area_4_2"] call SAR_AI_mon_upd;
|
||||
|
||||
// BYELOV, 0 bandit groups, 1 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,1,2],[0,75,100],[0,5,4]],"SAR_area_5_2"] call SAR_AI_mon_upd;
|
||||
|
||||
// WATER, 0 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_0_3"] call SAR_AI_mon_upd;
|
||||
|
||||
// CHERNOVAR, 2 bandit groups, 0 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,0,1],[75,0,50],[3,0,3]],"SAR_area_1_3"] call SAR_AI_mon_upd;
|
||||
|
||||
// ARMY_BASE, 0 bandit groups, 3 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,3,1],[0,75,75],[0,3,6]],"SAR_area_2_3"] call SAR_AI_mon_upd;
|
||||
|
||||
// ETANOVSK, 3 bandit groups, 1 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[3,1,1],[75,75,75],[3,4,2]],"SAR_area_3_3"] call SAR_AI_mon_upd;
|
||||
|
||||
// SABINA, 1 bandit groups, 3 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,3,1],[20,75,100],[4,4,2]],"SAR_area_4_3"] call SAR_AI_mon_upd;
|
||||
|
||||
// DUBOVO_AF, 1 bandit groups, 1 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[75,75,75],[2,4,2]],"SAR_area_5_3"] call SAR_AI_mon_upd;
|
||||
|
||||
// KRES, 1 bandit groups, 1 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[75,75,75],[2,4,2]],"SAR_area_0_4"] call SAR_AI_mon_upd;
|
||||
|
||||
// WATER, 0 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_1_4"] call SAR_AI_mon_upd;
|
||||
|
||||
// WATER, 0 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_2_4"] call SAR_AI_mon_upd;
|
||||
|
||||
// CHRVENI, 1 bandit groups, 2 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,2,2],[50,75,75],[4,4,2]],"SAR_area_3_4"] call SAR_AI_mon_upd;
|
||||
|
||||
// SOLIBOR, 1 bandit groups, 1 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[50,75,75],[3,4,2]],"SAR_area_4_4"] call SAR_AI_mon_upd;
|
||||
|
||||
// MOLOTOVSK, 1 bandit groups, 1 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[50,75,75],[4,4,2]],"SAR_area_5_4"] call SAR_AI_mon_upd;
|
||||
|
||||
// WATER, 0 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_0_5"] call SAR_AI_mon_upd;
|
||||
|
||||
// WATER, 0 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_1_5"] call SAR_AI_mon_upd;
|
||||
|
||||
// YELENI, 0 bandit groups, 3 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,3,1],[0,75,75],[0,4,3]],"SAR_area_2_5"] call SAR_AI_mon_upd;
|
||||
|
||||
// LYPESTOK, 2 bandit groups, 1 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,1,1],[50,75,75],[5,4,2]],"SAR_area_3_5"] call SAR_AI_mon_upd;
|
||||
|
||||
// SEVASTOPOL, 1 bandit groups, 1 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[1,1,1],[75,75,75],[2,4,2]],"SAR_area_4_5"] call SAR_AI_mon_upd;
|
||||
|
||||
// WATER, 0 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_5_5"] call SAR_AI_mon_upd;
|
||||
|
||||
// WATER, 0 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_0_6"] call SAR_AI_mon_upd;
|
||||
|
||||
// WATER, 0 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_1_6"] call SAR_AI_mon_upd;
|
||||
|
||||
// KAMENI, 3 bandit groups, 2 soldier groups, 1 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[3,2,1],[100,75,75],[2,4,5]],"SAR_area_2_6"] call SAR_AI_mon_upd;
|
||||
|
||||
// YAROSLAV, 2 bandit groups, 2 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,2,2],[80,75,75],[3,4,2]],"SAR_area_3_6"] call SAR_AI_mon_upd;
|
||||
|
||||
// DALNOGORSK, 2 bandit groups, 1 soldier groups, 2 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[2,1,2],[75,75,75],[3,4,4]],"SAR_area_4_6"] call SAR_AI_mon_upd;
|
||||
|
||||
// WATER, 0 bandit groups, 0 soldier groups, 0 survivor groups - spawn probability ba,so,su - maximum group members ba,so,su
|
||||
_check = [["max_grps","rnd_grps","max_p_grp"],[[0,0,0],[0,0,0],[0,0,0]],"SAR_area_5_6"] call SAR_AI_mon_upd;
|
||||
|
||||
|
||||
};
|
||||
|
||||
if (_type == "static") then {
|
||||
// ---------------------------------------------------------------
|
||||
// Definition of area markers for static spawns
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
// add if needed, see examples in the chernarus file
|
||||
|
||||
// Sabina, heli patrol area
|
||||
_this = createMarker ["SAR_patrol_sabina", [14894.9, 11081.3]];
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [1000, 4500];
|
||||
SAR_marker_helipatrol_sabina = _this;
|
||||
|
||||
// Lyepestok, heli patrol area
|
||||
_this = createMarker ["SAR_patrol_lyepestok", [11579.5, 15413.4]];
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [400, 400];
|
||||
SAR_marker_helipatrol_lyepestok = _this;
|
||||
|
||||
// NWAF, heli patrol area
|
||||
_this = createMarker ["SAR_patrol_nwaf", [10567, 18429.6]];
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [800, 1000];
|
||||
SAR_marker_helipatrol_nwaf = _this;
|
||||
|
||||
// Dubovo, heli patrol area
|
||||
_this = createMarker ["SAR_patrol_dubovo", [16540.9, 12674.3]];
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [500, 5000];
|
||||
SAR_marker_helipatrol_dubovo = _this;
|
||||
|
||||
// Krasnoznamensk, heli patrol area
|
||||
_this = createMarker ["SAR_patrol_kraz", [8482.28, 8101.42]];
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [500, 1700];
|
||||
_this setMarkerDir 262.10;
|
||||
SAR_marker_helipatrol_kraz = _this;
|
||||
|
||||
// Branibor, heli patrol area
|
||||
_this = createMarker ["SAR_patrol_branibor", [7206.91, 4933.56]];
|
||||
_this setMarkerShape "RECTANGLE";
|
||||
_this setMarkeralpha 0;
|
||||
_this setMarkerType "Flag";
|
||||
_this setMarkerBrush "Solid";
|
||||
_this setMarkerSize [400, 5000];
|
||||
_this setMarkerDir 127.30;
|
||||
SAR_marker_helipatrol_branibor = _this;
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
// End of area marker definition section
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
diag_log format["SAR_AI: Area & Trigger definition finalized"];
|
||||
diag_log format["SAR_AI: Static Spawning for Helicopter patrols started"];
|
||||
|
||||
//
|
||||
// Static, predefined heli patrol areas with configurable units
|
||||
//
|
||||
// Parameters used:
|
||||
// Areaname
|
||||
// 1,2,3 = soldier, survivors, bandits
|
||||
//
|
||||
|
||||
//Heli Patrol Sabina
|
||||
[SAR_marker_helipatrol_sabina,1] call SAR_AI_heli;
|
||||
|
||||
//Heli Patrol Lyepestok
|
||||
[SAR_marker_helipatrol_lyepestok,1] call SAR_AI_heli;
|
||||
|
||||
//Heli patrol NWAF
|
||||
[SAR_marker_helipatrol_nwaf,1] call SAR_AI_heli;
|
||||
|
||||
//Heli patrol Dubovo
|
||||
[SAR_marker_helipatrol_dubovo,1] call SAR_AI_heli;
|
||||
|
||||
//Heli patrol Krasnoznamensk
|
||||
[SAR_marker_helipatrol_kraz,1] call SAR_AI_heli;
|
||||
|
||||
//Heli patrol Branibor
|
||||
[SAR_marker_helipatrol_branibor,1] call SAR_AI_heli;
|
||||
|
||||
|
||||
// add if needed, see examples in the chernarus file
|
||||
|
||||
|
||||
|
||||
diag_log format["SAR_AI: Static Spawning for Helicopter patrols finished"];
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// Static, predefined infantry patrols in defined areas with configurable units
|
||||
//---------------------------------------------------------------------------------
|
||||
// Example: [SAR_area_DEBUG,1,0,1,""] call SAR_AI;
|
||||
//
|
||||
// SAR_area_DEBUG = areaname (must have been defined further up)
|
||||
// 1 = type of group (1 = soldiers, 2 = survivors, 3 = bandits)
|
||||
// 0 = amount of snipers in the group
|
||||
// 1 = amount of rifleman in the group
|
||||
//
|
||||
//
|
||||
|
||||
// Example entries:
|
||||
// SARGE DEBUG - Debug group
|
||||
// military, 0 snipers, 1 riflemen, patrol
|
||||
//[SAR_area_DEBUG,1,0,1,""] call SAR_AI;
|
||||
|
||||
// military, 2 snipers, 4 riflemen, patrol
|
||||
//[SAR_area_DEBUG,1,2,4,""] call SAR_AI;
|
||||
|
||||
// survivors, 1 snipers, 3 riflemen, patrolling the NWAF
|
||||
//[SAR_marker_helipatrol_nwaf,2,1,3,""] call SAR_AI;
|
||||
|
||||
// bandits, 5 snipers, 2 riflemen, patrolling the NWAF
|
||||
//[SAR_marker_helipatrol_nwaf,3,5,2,""] call SAR_AI;
|
||||
//---------------------------------------------------------------------------------
|
||||
|
||||
|
||||
// add here if needed
|
||||
|
||||
|
||||
|
||||
|
||||
// ---- end of configuration area ----
|
||||
|
||||
diag_log format["SAR_AI: Static Spawning for infantry patrols finished"];
|
||||
};
|
@ -1,14 +0,0 @@
|
||||
/*
|
||||
# Original #
|
||||
Sarge AI System 1.5
|
||||
Created for Arma 2: DayZ Mod
|
||||
Author: Sarge
|
||||
https://github.com/Swiss-Sarge
|
||||
|
||||
# Fork #
|
||||
Sarge AI System 2.0+
|
||||
Modded for Arma 3: Exile Mod
|
||||
Changes: Dango
|
||||
https://www.hod-servers.com
|
||||
|
||||
*/
|
@ -1,44 +0,0 @@
|
||||
private["_authorizedUID","_authorizedPUID","_flagRadius","_attackAllToggle","_tGuard","_isBaseGuard","_flag","_nearestGuards","_friendlyPlayers"];
|
||||
_flag = _this select 0;
|
||||
_authorizedUID = _flag getVariable ["ExileTerritoryBuildRights", []];
|
||||
_authorizedPUID = _authorizedUID select 0;
|
||||
_flagRadius = _flag getVariable ["ExileTerritorySize",""];;
|
||||
_isBaseGuard = false;
|
||||
if (!(isNull _flag)) then {
|
||||
_nearestGuards = (getPosATL _flag) nearEntities [["AllVehicles","CAManBase"], _flagRadius + 100];
|
||||
} else {
|
||||
_nearestGuards = (getPosATL player) nearEntities [["AllVehicles","CAManBase"], _flagRadius + 100];
|
||||
};
|
||||
if (count _nearestGuards > 0) then {
|
||||
{
|
||||
_tGuard = _x;
|
||||
if (!(isPlayer _tGuard)) then {
|
||||
_friendlyPlayers = _tGuard getVariable ["SAR_FLAG_FRIENDLY", []];
|
||||
// If group has array
|
||||
if (count _friendlyPlayers > 0) then {
|
||||
{
|
||||
if (_x in _friendlyPlayers) exitWith {
|
||||
_isBaseGuard = true; // Guard is part of the base owners guards
|
||||
};
|
||||
} foreach _authorizedPUID;
|
||||
// Toggle his attack mode
|
||||
if (_isBaseGuard) then {
|
||||
_attackAllToggle = _tGuard getVariable ["ATTACK_ALL", true];
|
||||
if (_attackAllToggle) then {
|
||||
_tGuard setVariable ["ATTACK_ALL", false, true];
|
||||
cutText ["Guards will only attack those who attack it.\nGive them 15-20 seconds to receive orders.", "PLAIN DOWN"];
|
||||
hintsilent "Guards will only attack those who attack it.\nGive them 15-20 seconds to receive orders.";
|
||||
Breakout "exit";
|
||||
} else {
|
||||
_tGuard setVariable ["ATTACK_ALL", true, true];
|
||||
cutText ["Guards will attack any players or npcs that is not tied to FlagPole.\nGive them 15-20 seconds to receive orders.", "PLAIN DOWN"];
|
||||
hintsilent "Guards will attack any players or npcs that is not tied to FlagPole.\nGive them 15-20 seconds to receive orders.";
|
||||
Breakout "exit";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
} forEach _nearestGuards;
|
||||
cutText ["No guards were found in the area", "PLAIN DOWN"];
|
||||
hintsilent "No guards were found in the area";
|
||||
} else {cutText ["No guards in the area", "PLAIN DOWN"]; hintsilent "No guards were found in the area";};
|
@ -1,214 +0,0 @@
|
||||
// only run on server (including SP, MP, Dedicated) and Headless Client
|
||||
if (!isServer && hasInterface ) exitWith {};
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// These Variables should be checked and set as required, to make the mission runs properly.
|
||||
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//1=Enable or 0=disable debug. In debug could see a mark positioning de leader and another mark of the destination of movement, very useful for editing mission
|
||||
UPSMON_Debug = 0;
|
||||
|
||||
//Max waiting is the maximum time patrol groups will wait when arrived to target for doing another target.
|
||||
UPSMON_maxwaiting = 10;
|
||||
|
||||
// Set How many time a unit will search around a suspect position
|
||||
UPSMON_SRCHTIME = 90;
|
||||
|
||||
// if you are spotted by AI group, how close the other AI group have to be to You , to be informed about your present position. over this, will lose target
|
||||
UPSMON_sharedist = 800; // org value 800 => increased for ArmA3 map sizes for less predictable missions..
|
||||
|
||||
// knowsAbout 0.5 1.03 , 1.49 to add this enemy to "target list" (1-4) the higher number the less detect ability (original in 5.0.7 was 0.5)
|
||||
// it does not mean the AI will not shoot at you. This means: what must be knowsAbout you to UPSMON adds you to the list of targets (UPSMON list of target)
|
||||
UPSMON_knowsAboutEnemy = 1.5; // 5
|
||||
|
||||
//////////////////////// MODULES ////////////////////////////////////////////
|
||||
//Enable it to send reinforcements, better done it in a trigger inside your mission.
|
||||
UPSMON_reinforcement = false; // ToDo Set to true if UPSMON reinf is going ot be used
|
||||
|
||||
//Artillery support, better control if set in trigger
|
||||
UPSMON_ARTILLERY_EAST_FIRE = false; //set to true for doing east to fire //ToDo verify if needed
|
||||
UPSMON_ARTILLERY_WEST_FIRE = false; //set to true for doing west to fire
|
||||
UPSMON_ARTILLERY_GUER_FIRE = false; //set to true for doing resistance to fire
|
||||
|
||||
// Can the group surrender?
|
||||
UPSMON_SURRENDER = false;
|
||||
|
||||
// Chance of Surrender/100
|
||||
UPSMON_WEST_SURRENDER = 10;
|
||||
UPSMON_EAST_SURRENDER = 10;
|
||||
UPSMON_GUER_SURRENDER = 10;
|
||||
|
||||
// Chance of Retreating/100
|
||||
UPSMON_WEST_RETREAT = 0;
|
||||
UPSMON_EAST_RETREAT = 0;
|
||||
UPSMON_GUER_RETREAT = 0;
|
||||
|
||||
/// Civilian Hostility (Set to 0 if you want to disable the function)
|
||||
UPSMON_Ammountofhostility = 0;
|
||||
|
||||
UPSMON_WEST_HM = 10;
|
||||
UPSMON_EAST_HM = 100;
|
||||
UPSMON_GUER_HM = 100;
|
||||
|
||||
//////////////////////// ////////////////////////////////////////////
|
||||
|
||||
//Height that heli will fly this input will be randomised in a 10%
|
||||
UPSMON_flyInHeight = 40; //80;
|
||||
|
||||
//Max distance to target for doing para-drop, will be randomised between 0 and 100% of this value.
|
||||
UPSMON_paradropdist = 400;
|
||||
|
||||
//Height that heli will fly if his mission is paradroping.
|
||||
UPSMON_paraflyinheight = 110;
|
||||
|
||||
// Distance from destination for searching vehicles. (Search area is about 200m),
|
||||
// If your destination point is further than UPSMON_searchVehicledist, AI will try to find a vehicle to go there.
|
||||
UPSMON_searchVehicledist = 900; // 700, 900
|
||||
|
||||
// How far opfor disembark from non armoured vehicle
|
||||
UPSMON_closeenoughV = 800;
|
||||
|
||||
// how close unit has to be to target to generate a new one target or to enter stealth mode
|
||||
UPSMON_closeenough = 300; // ToDo investigate effect of decrease of this value to e.g. 50 // 300
|
||||
|
||||
//Do the unit react to near dead bodies;
|
||||
UPSMON_deadBodiesReact = true;
|
||||
|
||||
//Do unit can lay down mine (ambush and defense module)
|
||||
UPSMON_useMines = true;
|
||||
|
||||
//Distance from ambush point
|
||||
UPSMON_ambushdist = 100;
|
||||
|
||||
//% of chance to use smoke by team members when someone wounded or killed in the group in %(default 13 & 35).
|
||||
// set both to 0 -> to switch off this function
|
||||
UPSMON_USE_SMOKE = 20; // org 13: decreased while AI is popping smoke a bit too often
|
||||
|
||||
//Allow Relax units during nightime to create fireplace
|
||||
UPSMON_Allowfireplace = false;
|
||||
|
||||
//Allow Units to Rearm
|
||||
UPSMON_AllowRearm = false;
|
||||
|
||||
//=============================================================================================================================
|
||||
//=============================== DO NOT TOUCH THESE VARIABLES ================================================================
|
||||
|
||||
//UPSMON_Version
|
||||
UPSMON_Version = "UPSMON 6.0.9.5";
|
||||
//Misc Array
|
||||
UPSMON_Total = 0;
|
||||
UPSMON_Instances = 0;
|
||||
UPSMON_Exited = 0;
|
||||
UPSMON_AllWest = 0;
|
||||
UPSMON_AllEast = 0;
|
||||
UPSMON_AllRes = 0;
|
||||
upsmon_west_total = 0;
|
||||
upsmon_east_total = 0;
|
||||
UPSMON_GUER_Total = 0;
|
||||
//Reinforcement group array
|
||||
UPSMON_REINFORCEMENT_WEST_UNITS = [];
|
||||
UPSMON_REINFORCEMENT_EAST_UNITS = [];
|
||||
UPSMON_REINFORCEMENT_GUER_UNITS = [];
|
||||
//Artillery group array
|
||||
UPSMON_ARTILLERY_WEST_UNITS = [];
|
||||
UPSMON_ARTILLERY_EAST_UNITS = [];
|
||||
UPSMON_ARTILLERY_GUER_UNITS = [];
|
||||
//Transport group array
|
||||
UPSMON_TRANSPORT_WEST_UNITS = [];
|
||||
UPSMON_TRANSPORT_EAST_UNITS = [];
|
||||
UPSMON_TRANSPORT_GUER_UNITS = [];
|
||||
//Supply group array
|
||||
UPSMON_SUPPLY_WEST_UNITS = [];
|
||||
UPSMON_SUPPLY_EAST_UNITS = [];
|
||||
UPSMON_SUPPLY_GUER_UNITS = [];
|
||||
//Supply group array
|
||||
UPSMON_SUPPORT_WEST_UNITS = [];
|
||||
UPSMON_SUPPORT_EAST_UNITS = [];
|
||||
UPSMON_SUPPORT_GUER_UNITS = [];
|
||||
//tracked units array
|
||||
UPSMON_Trackednpcs = [];
|
||||
//Targetpos of groups
|
||||
UPSMON_targetsPos = [];
|
||||
//Units array by sides
|
||||
UPSMON_AllWest = [];
|
||||
UPSMON_AllEast = [];
|
||||
UPSMON_AllRes = [];
|
||||
//UPSMON Array groups
|
||||
UPSMON_NPCs = [];
|
||||
UPSMON_Civs = [];
|
||||
//Markers Array
|
||||
UPSMON_Markers = [];
|
||||
//Template Array
|
||||
UPSMON_TEMPLATES = [];
|
||||
//EH Killed Civ
|
||||
KILLED_CIV_COUNTER = [];
|
||||
|
||||
UPSMON_FlareInTheAir = false;
|
||||
|
||||
UPSMON_GOTKILL_ARRAY = [];
|
||||
UPSMON_GOTHIT_ARRAY = [];
|
||||
|
||||
//===============================================================================
|
||||
//======================== =====================================
|
||||
|
||||
// logic is needed to display rGlobalChat
|
||||
private ["_center","_group","_UPSMON_Minesclassname","_m"];
|
||||
_center = createCenter sideLogic; _group = createGroup _center;
|
||||
UPSMON_Logic_civkill = _group createUnit ["LOGIC", [1,1,1], [], 0, "NONE"];
|
||||
_group = nil;
|
||||
_center = nil;
|
||||
|
||||
UPSMON = compile preProcessFileLineNumbers "Scripts\UPSMON.sqf";
|
||||
UPSMON_CreateGroup = compile preProcessFileLineNumbers "Scripts\UPSMON\UPSMON_CreateGroup.sqf";
|
||||
|
||||
//Core
|
||||
call compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\init.sqf";
|
||||
call compile preprocessFileLineNumbers "Scripts\UPSMON\Get_pos\UPSMON_pos_init.sqf";
|
||||
//Params
|
||||
call compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Group\init.sqf";
|
||||
call compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\target\init.sqf";
|
||||
call compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\unit\init.sqf";
|
||||
call compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Params\init.sqf";
|
||||
call compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\buildings\init.sqf";
|
||||
call compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\vehicles\init.sqf";
|
||||
call compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\cover\init.sqf";
|
||||
call compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\terrain\init.sqf";
|
||||
call compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\MP\init.sqf";
|
||||
//Modules
|
||||
call compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\init.sqf";
|
||||
call compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\FORTIFY\init.sqf";
|
||||
call compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\AMBUSH\init.sqf";
|
||||
call compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\ARTILLERY\init.sqf";
|
||||
//Orders
|
||||
call compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\ORDERS\UPSMON_PATROL\init.sqf";
|
||||
call compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\ORDERS\UPSMON_REINFORCEMENT\init.sqf";
|
||||
call compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\ORDERS\UPSMON_Transport\init.sqf";
|
||||
call compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\ORDERS\UPSMON_PATROLSRCH\init.sqf";
|
||||
call compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\ORDERS\UPSMON_FLANK\init.sqf";
|
||||
call compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\ORDERS\UPSMON_ASSAULT\init.sqf";
|
||||
call compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\ORDERS\UPSMON_DEFEND\init.sqf";
|
||||
call compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\ORDERS\UPSMON_RELAX\init.sqf";
|
||||
call compile preProcessFileLineNumbers "Scripts\UPSMON\MODULES\ORDERS\UPSMON_SUPPLY\init.sqf";
|
||||
|
||||
[] execvm "Scripts\UPSMON\COMMON\CORE\fnc\UPSMON_TRACK.sqf";
|
||||
[] execvm "Scripts\UPSMON\UPSMON_MAINLOOP.sqf";
|
||||
[] execvm "Scripts\UPSMON\UPSMON_MAINLOOPCiv.sqf";
|
||||
|
||||
//get all mines types
|
||||
_UPSMON_Minesclassname = [] call UPSMON_getminesclass;
|
||||
UPSMON_Minestype1 = _UPSMON_Minesclassname select 0; // ATmines
|
||||
UPSMON_Minestype2 = _UPSMON_Minesclassname select 1; // APmines
|
||||
|
||||
|
||||
_m = createMarker ["DummyUPSMONMarker",[0,0]];
|
||||
_m setmarkerColor "Colorblack";
|
||||
_m setMarkerShape "ELLIPSE";
|
||||
_m setMarkerSize [100,100];
|
||||
_m setMarkerBrush "Solid";
|
||||
_m setmarkerAlpha 0;
|
||||
|
||||
|
||||
|
||||
//Initialization done
|
||||
UPSMON_INIT=1;
|
@ -1,391 +0,0 @@
|
||||
// SERVER OR HEADLESS CLIENT CHECK
|
||||
//if (!isServer) exitWith {};
|
||||
if (!isServer && hasInterface ) exitWith {};
|
||||
|
||||
if (isNil("UPSMON_INIT")) then {
|
||||
UPSMON_INIT=0;
|
||||
};
|
||||
|
||||
if (isNil("UPSMON_Night")) then {
|
||||
UPSMON_Night = false;
|
||||
};
|
||||
|
||||
waitUntil {UPSMON_INIT==1};
|
||||
|
||||
if ((count _this)<2) exitWith
|
||||
{
|
||||
If (UPSMON_Debug > 0) then {hint "UPSMON: Unit and marker name have to be defined!"};
|
||||
};
|
||||
|
||||
//=================== Group ======================================
|
||||
//================================================================
|
||||
|
||||
private ["_obj","_npc","_Ucthis","_grpid","_side","_grpname","_grp","_currpos","_behaviour","_formation","_speed","_members","_grptype","_areamarker","_centerpos","_centerX","_centerY","_areasize","_area","_rangeX","_rangeY","_grpmission","_spawned","_unitstypes","_respawn","_respawnpos","_respawntime","_respawndelay","_template","_issoldier","_hostility","_onroad","_shareinfos","_noveh","_fortify","_nowpType","_ambush","_radiorange","_initpos","_bldpositions","_positiontoambush","_wait","_time"];
|
||||
//group or leader
|
||||
_obj = _this select 0;
|
||||
|
||||
If ((typename _obj != "OBJECT" && typename _obj != "GROUP") || IsNil "_obj" || IsNull _obj) exitwith
|
||||
{
|
||||
If (UPSMON_Debug > 0) then {Hint "UPSMON: Unit not defined!"};
|
||||
};
|
||||
|
||||
// Get leader
|
||||
_npc = [_obj] call UPSMON_SetLeaderGrp;
|
||||
|
||||
If (!alive _npc) exitwith
|
||||
{
|
||||
If (UPSMON_Debug > 0) then {Hint "UPSMON: Leader is dead!"};
|
||||
};
|
||||
|
||||
// Get parameters
|
||||
_Ucthis = [_this] call UPSMON_GetParams;
|
||||
|
||||
// give this group a unique index
|
||||
UPSMON_Instances = UPSMON_Instances + 1;
|
||||
_grpid = UPSMON_Instances;
|
||||
|
||||
// group infos
|
||||
_side = side _npc;
|
||||
_grpname = format["%1_%2",_side,_grpid];
|
||||
_grp = group _npc;
|
||||
_currpos = GetposATL _npc;
|
||||
_behaviour = [_npc,_Ucthis] call UPSMON_GetGroupbehaviour;
|
||||
_formation = [_npc,_Ucthis] call UPSMON_GetGroupformation;
|
||||
_speed = [_npc,_Ucthis] call UPSMON_GetGroupspeed;
|
||||
_members = units _grp;
|
||||
|
||||
// what type of "vehicle" is _npc ?
|
||||
_grptype = [_npc] call UPSMON_grptype;
|
||||
|
||||
//Set EH
|
||||
[_members,_Ucthis,_grpid] spawn UPSMON_SetEventhandlers;
|
||||
|
||||
_grp setVariable ["UPSMON_Ucthis", _Ucthis, false];
|
||||
_grp setVariable ["UPSMON_grpid", _grpid, false];
|
||||
_grp setvariable ["UPSMON_Origin",[_currpos,_behaviour,_speed,_formation,_members,_side]];
|
||||
|
||||
// == get the name of area marker ==============================================
|
||||
_areamarker = _this select 1;
|
||||
if (typename _areamarker != "STRING" || isNil ("_areamarker")) exitWith
|
||||
{
|
||||
hint "UPSMON: Area marker not defined.\n(Typo, or name not enclosed in quotation marks?)";
|
||||
};
|
||||
|
||||
[_grp,_areamarker,_Ucthis] spawn UPSMON_SetMarkerArea;
|
||||
_grp setVariable ["UPSMON_Marker", _areamarker, false];
|
||||
|
||||
// remember center position of area marker
|
||||
_centerpos = getMarkerPos _areamarker;
|
||||
_centerX = abs(_centerpos select 0);
|
||||
_centerY = abs(_centerpos select 1);
|
||||
_centerpos = [_centerX,_centerY];
|
||||
|
||||
// X/Y range of target area
|
||||
_areasize = getMarkerSize _areamarker;
|
||||
_rangeX = _areasize select 0;
|
||||
_rangeY = _areasize select 1;
|
||||
_area = abs((_rangeX * _rangeY) ^ 0.5);
|
||||
|
||||
// ===============================================
|
||||
|
||||
if (UPSMON_Debug>0) then {player sidechat format["%1: New instance %2",_grpname,_grpid]};
|
||||
|
||||
//To not run all at the same time we hope to have as many seconds as id's
|
||||
sleep (random 0.8);
|
||||
|
||||
_grpmission = "PATROL";
|
||||
|
||||
UPSMON_Total = UPSMON_Total + (count _members);
|
||||
|
||||
|
||||
if (UPSMON_Debug>0 && !alive _npc) then {player sidechat format["%1 There is no alive members %1 %2 %3",_grpid,typename _npc,typeof _npc, count units _npc]};
|
||||
|
||||
///================= Optional parameters ===================================
|
||||
//Track Option
|
||||
If ("TRACK" in _UCthis || UPSMON_Debug > 0) then {UPSMON_Trackednpcs pushback _grp;};
|
||||
|
||||
// Spawn part ===================================
|
||||
//spawned for squads created in runtime
|
||||
_spawned= if ("SPAWNED" in _UCthis) then {true} else {false};
|
||||
if (_spawned) then
|
||||
{
|
||||
//if (UPSMON_Debug>0) then {player sidechat format["%1: squad has been spawned, respawns %2",_grpid,_respawnmax]};
|
||||
switch (side _grp) do
|
||||
{
|
||||
case west:
|
||||
{
|
||||
UPSMON_AllWest=UPSMON_AllWest + units _npc;
|
||||
};
|
||||
case east:
|
||||
{
|
||||
UPSMON_AllEast=UPSMON_AllEast + units _npc;
|
||||
};
|
||||
case resistance:
|
||||
{
|
||||
UPSMON_AllRes=UPSMON_AllRes + units _npc;
|
||||
};
|
||||
};
|
||||
|
||||
if (side _grp != civilian) then {call (compile format ["UPSMON_%1_Total = UPSMON_%1_Total + count (units _npc)",side _npc]);};
|
||||
};
|
||||
//
|
||||
_unitstypes = [_members] call UPSMON_Getmemberstype;
|
||||
_grp setvariable ["UPSMON_RESPAWNUNITS",_unitstypes];
|
||||
|
||||
//Respawn
|
||||
_respawn = if ("RESPAWN" in _UCthis || "RESPAWN:" in _UCthis) then {true} else {false};
|
||||
_respawnpos = [_Ucthis,_npc] call UPSMON_GetRespawnpos;
|
||||
_respawntime = [_Ucthis] call UPSMON_GetRespawntime;
|
||||
_respawndelay = [_Ucthis] call UPSMON_GetRespawndelay;
|
||||
|
||||
_grp setvariable ["UPSMON_RESPAWN",_respawn];
|
||||
_grp setvariable ["UPSMON_RESPAWNPOS",_respawnpos];
|
||||
_grp setvariable ["UPSMON_RESPAWNTIME",_respawntime];
|
||||
_grp setvariable ["UPSMON_RESPAWNDELAY",_respawndelay];
|
||||
|
||||
//Template
|
||||
_template = ["TEMPLATE:",0,_UCthis] call UPSMON_getArg;
|
||||
[_spawned,_template,_side,_unitstypes] spawn UPSMON_SetTemplate;
|
||||
|
||||
//Clones
|
||||
[_Ucthis,_unitstypes] spawn UPSMON_SetClones;
|
||||
//===================================================
|
||||
|
||||
// suppress fight behaviour
|
||||
_isSoldier = if ("NOAI" in _UCthis || _side == CIVILIAN) then {false} else {true};
|
||||
_grp setvariable ["UPSMON_NOAI",_isSoldier];
|
||||
|
||||
If (_side == CIVILIAN) then
|
||||
{
|
||||
_hostility = ["Hostility:",0,_UCthis] call UPSMON_getArg;
|
||||
_grp setvariable ["UPSMON_GrpHostility",_hostility]
|
||||
};
|
||||
// create _targerpoint on the roads only (by this group)
|
||||
_onroad = if ("ONROAD" in _UCthis) then {true} else {false};
|
||||
_grp setvariable ["UPSMON_ONROAD",_onroad];
|
||||
|
||||
// Group will not throw smoke
|
||||
if ("NOSMOKE" in _UCthis) then {_grp setvariable ["UPSMON_NOSMOKE",true]};
|
||||
|
||||
//Do group share infos ?
|
||||
_shareinfos = If ("NOSHARE" in _UCthis) then {false} else {true};
|
||||
_grp setvariable ["UPSMON_Shareinfos",_shareinfos];
|
||||
|
||||
// Group will not call artillery support
|
||||
if ("NOARTILLERY" in _UCthis) then {_grp setvariable ["UPSMON_NOARTILLERY",true];};
|
||||
|
||||
|
||||
// Squad will not leave his marker area
|
||||
if ("NOFOLLOW" in _UCthis) then {_grp setvariable ["UPSMON_NOFOLLOW",true];};
|
||||
|
||||
// do not search for vehicles (unless in fight and combat vehicles)
|
||||
_noveh = if ("NOVEH" in _UCthis) then {1} else {0};
|
||||
_noveh = if ("NOVEH2" in _UCthis) then {2} else {_noveh}; // Ajout
|
||||
_grp setvariable ["UPSMON_NOVEH",_noveh];
|
||||
|
||||
[_grp,_Ucthis] call UPSMON_SetRenfParam;
|
||||
|
||||
//fortify group in near places
|
||||
_fortify= if ("FORTIFY" in _UCthis) then {true} else {false};
|
||||
_fortifyorig = if ("FORTIFY" in _UCthis) then {true} else {false};
|
||||
|
||||
//TRANSPORT group
|
||||
if ("TRANSPORT" in _UCthis) then
|
||||
{
|
||||
_grp setvariable ["UPSMON_TRANSPORT",true];
|
||||
If (count (_grp getvariable ["UPSMON_Transportmission",[]]) == 0) then {_grp getvariable ["UPSMON_Transportmission",["WAITING",_currpos,Objnull]]};
|
||||
If (_grptype == "IsAir") then {_h1 = createVehicle ["Land_HelipadEmpty_F",_currpos, [], 0, "NONE"];};
|
||||
switch (_side) do {
|
||||
case West: {
|
||||
if (isnil "UPSMON_TRANSPORT_WEST_UNITS") then {UPSMON_TRANSPORT_WEST_UNITS = []};
|
||||
UPSMON_TRANSPORT_WEST_UNITS pushback _grp;
|
||||
};
|
||||
case EAST: {
|
||||
if (isnil "UPSMON_TRANSPORT_EAST_UNITS") then {UPSMON_TRANSPORT_EAST_UNITS = []};
|
||||
UPSMON_TRANSPORT_EAST_UNITS pushback _grp;
|
||||
};
|
||||
case RESISTANCE: {
|
||||
if (isnil "UPSMON_TRANSPORT_GUER_UNITS") then {UPSMON_TRANSPORT_GUER_UNITS = []};
|
||||
UPSMON_TRANSPORT_GUER_UNITS pushback _grp;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
//Patrol in building
|
||||
If ("LANDDROP" in _UCthis) then {_grp setvariable ["UPSMON_LANDDROP",true];};
|
||||
|
||||
// don't make waypoints
|
||||
_nowpType = if ("NOWP" in _UCthis) then {1} else {0};
|
||||
_nowpType = if ("NOWP2" in _UCthis) then {2} else {_nowpType};
|
||||
_nowpType = if ("NOWP3" in _UCthis) then {3} else {_nowpType};
|
||||
_grp setvariable ["UPSMON_NOWP",_nowpType];
|
||||
|
||||
//Ambush squad will no move until in combat or so close enemy
|
||||
_ambush= if (("AMBUSH" in _UCthis) || ("AMBUSHDIR:" in _UCthis) || ("AMBUSH2" in _UCthis) || ("AMBUSHDIR2:" in _UCthis)) then {true} else {false};
|
||||
|
||||
// Range of AI radio so AI can call Arty or Reinforcement
|
||||
_RadioRange = ["RADIORANGE:",8000,_UCthis] call UPSMON_getArg; // ajout
|
||||
|
||||
// set drop units at random positions
|
||||
_initpos = "ORIGINAL";
|
||||
if ("RANDOM" in _UCthis) then {_initpos = "RANDOM"};
|
||||
if ("RANDOMUP" in _UCthis) then {_initpos = "RANDOMUP"};
|
||||
if ("RANDOMDN" in _UCthis) then {_initpos = "RANDOMDN"};
|
||||
if ("RANDOMA" in _UCthis) then {_initpos = "RANDOMA"};
|
||||
// don't position groups or vehicles on rooftops
|
||||
if ((_initpos!="ORIGINAL") && (_grptype != "IsMan")) then {_initpos="RANDOM"};
|
||||
|
||||
|
||||
|
||||
|
||||
//=================================================================================
|
||||
//============== initialization Random / Ambush / Fortify ======================
|
||||
|
||||
// make start position random
|
||||
if (_initpos!="ORIGINAL") then
|
||||
{
|
||||
// find a random position (try a max of 20 positions)
|
||||
_try=0;
|
||||
_bldpositions = [];
|
||||
_currPos = [];
|
||||
_range = _rangeX;
|
||||
if (_rangeX < _rangeY) then {_range = _rangeY};
|
||||
|
||||
if (_initpos=="RANDOM") then
|
||||
{
|
||||
while {_try<20} do
|
||||
{
|
||||
if (_grptype == "Isboat" || _grptype == "Isdiver") then
|
||||
{
|
||||
_currPos = [_areamarker,2,[],1] call UPSMON_pos;
|
||||
}
|
||||
else
|
||||
{
|
||||
_currPos=[_areamarker,0,[],1] call UPSMON_pos;
|
||||
};
|
||||
|
||||
if (count _currPos > 0) then {_try=99};
|
||||
_try=_try+1;
|
||||
sleep .01;
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
//(_initpos=="RANDOMUP") || (_initpos=="RANDOMDN") || (_initpos=="RANDOMA")
|
||||
_bldpositions = [[_centerX,_centerY,0],_initpos,_range,_areamarker,true] call UPSMON_GetNearestBuildings;
|
||||
};
|
||||
|
||||
if (count _bldpositions == 0) then
|
||||
{
|
||||
if (count _currPos == 0) then {_currPos = getPosATL _npc;};
|
||||
{ //man
|
||||
if (vehicle _x == _x) then
|
||||
{
|
||||
_targetpos = _currPos findEmptyPosition [0, 50];
|
||||
sleep .05;
|
||||
if (count _targetpos == 0) then {_targetpos = _currpos};
|
||||
_x setpos _targetpos;
|
||||
}
|
||||
else
|
||||
{
|
||||
_targetpos = [];
|
||||
If (_grptype != "Isboat") then {_targetpos = _currPos findEmptyPosition [10,50];};
|
||||
sleep .05;
|
||||
if (count _targetpos == 0) then {_targetpos = _currpos};
|
||||
_x setPos _targetpos;
|
||||
};
|
||||
} foreach units _npc;
|
||||
}
|
||||
else
|
||||
{
|
||||
// put the unit on top of a building
|
||||
_units = [units _npc] call UPSMON_getunits;
|
||||
_grpmission = "STATIC";
|
||||
If (_nowpType == 3) then
|
||||
{
|
||||
_unitsin = [_npc,["static"],_range,true,_areamarker] call UPSMON_GetIn_NearestVehicles;
|
||||
_units = _units - _unitsin;
|
||||
_grpmission = "FORTIFY";
|
||||
[_grp,[0,0],"HOLD","LINE","LIMITED","AWARE","YELLOW",1] call UPSMON_DocreateWP;
|
||||
}
|
||||
else
|
||||
{
|
||||
_nowpType = 1; // don't move if on roof
|
||||
};
|
||||
If (count _units > 0) then {_units = [_units,_bldpositions] call UPSMON_SpawninBuildings;};
|
||||
_currPos = getPosATL _npc;
|
||||
};
|
||||
};
|
||||
|
||||
_combatmode = "YELLOW";
|
||||
// AMBUSH
|
||||
If (_ambush) then
|
||||
{
|
||||
[_grp,[0,0],"HOLD","LINE","LIMITED","STEALTH","BLUE",1] call UPSMON_DocreateWP;
|
||||
_grp setvariable ["UPSMON_AMBUSHFIRE",false];
|
||||
|
||||
{
|
||||
If !(isNil "bdetect_enable") then {_x setVariable ["bcombat_task", [ "", "mydummytask", 100, [] ] ];};
|
||||
} foreach units _npc;
|
||||
_positiontoambush = [_grp,_Ucthis,_currpos] call UPSMON_getAmbushpos;
|
||||
_grpmission = "AMBUSH";
|
||||
_grp setvariable ["UPSMON_Positiontoambush",_positiontoambush];
|
||||
_wait = ["AMBUSHWAIT:",500,_UCthis] call UPSMON_getArg;
|
||||
_time = time + _wait;
|
||||
_grp setvariable ["UPSMON_AMBUSHWAIT",_time];
|
||||
_linkdistance = ["LINKED:",0,_UCthis] call UPSMON_getArg;
|
||||
_grp setvariable ["UPSMON_LINKED",_linkdistance];
|
||||
|
||||
_Behaviour = "STEALTH";
|
||||
_combatmode = "BLUE";
|
||||
};
|
||||
|
||||
if (_fortify) then
|
||||
{
|
||||
[_grp,[0,0],"HOLD","LINE","LIMITED","AWARE","YELLOW",1] call UPSMON_DocreateWP;
|
||||
_unitsin = [_npc,["static"],50,false,""] call UPSMON_GetIn_NearestVehicles;
|
||||
_units = (units _grp) - _unitsin;
|
||||
if ( count _units > 0 ) then
|
||||
{
|
||||
_units = [_npc,_units,70,9999] call UPSMON_moveNearestBuildings;
|
||||
If (count _units > 0) then
|
||||
{
|
||||
_lookpos = [getposATL _npc,getdir _npc, 20] call UPSMON_GetPos2D;
|
||||
[getposATL _npc,_lookpos,50,false,_units] call UPSMON_fnc_find_cover;
|
||||
};
|
||||
|
||||
};
|
||||
_grpmission = "FORTIFY";
|
||||
};
|
||||
|
||||
If ("RELAX" in _Ucthis) then {_grpmission = "RELAX";_nowtype = 2;};
|
||||
|
||||
If (_nowpType > 0 && _grpmission != "FORTIFY") then {_grpmission = "STATIC"};
|
||||
|
||||
{_x allowfleeing 0;} foreach units _grp;
|
||||
_grp enableAttack false;
|
||||
_npc setbehaviour _Behaviour;
|
||||
_npc setspeedmode _speed;
|
||||
_grp setformation _formation;
|
||||
_grp setcombatmode _combatmode;
|
||||
|
||||
// did the leader die?
|
||||
_npc = [_npc,_grp] call UPSMON_getleader;
|
||||
if (!alive _npc || !canmove _npc || isplayer _npc ) exitwith {};
|
||||
|
||||
_grp setvariable ["UPSMON_GrpStatus","GREEN"];
|
||||
_grp setvariable ["UPSMON_GrpMission",_grpmission];
|
||||
_grp setvariable ["UPSMON_OrgGrpMission",_grpmission];
|
||||
_grp setvariable ["UPSMON_Lastinfos",[[0,0,0],[0,0,0]]];
|
||||
_grp setvariable ["UPSMON_NOWP",_nowpType];
|
||||
_grp setvariable ["UPSMON_Removegroup",false];
|
||||
|
||||
//Assign the current group in the array of UPSMON Groups
|
||||
If (_side != civilian) then
|
||||
{
|
||||
If (!(_grp in UPSMON_NPCs)) then {UPSMON_NPCs pushback _grp;};
|
||||
}
|
||||
else
|
||||
{
|
||||
If (!(_grp in UPSMON_Civs)) then {UPSMON_Civs pushback _grp;};
|
||||
};
|
@ -1,111 +0,0 @@
|
||||
/****************************************************************
|
||||
File:
|
||||
Author:
|
||||
|
||||
Description:
|
||||
|
||||
Parameter(s):
|
||||
|
||||
Returns:
|
||||
|
||||
****************************************************************/
|
||||
private["_grp","_typeofgrp","_side"];
|
||||
|
||||
_grp = _this select 0;
|
||||
_typeofgrp = _this select 1;
|
||||
|
||||
_side = side _grp;
|
||||
|
||||
|
||||
switch (_side) do
|
||||
{
|
||||
case "WEST":
|
||||
{
|
||||
If ("arti" in _typeofgrp) then
|
||||
{
|
||||
If (!(_grp in UPSMON_ARTILLERY_WEST_UNITS)) then {UPSMON_ARTILLERY_WEST_UNITS pushback _grp;};
|
||||
}
|
||||
else
|
||||
{
|
||||
If (_grp in UPSMON_ARTILLERY_WEST_UNITS) then {UPSMON_ARTILLERY_WEST_UNITS = UPSMON_ARTILLERY_WEST_UNITS - [_grp];};
|
||||
};
|
||||
|
||||
If ("plane" in _typeofgrp) then
|
||||
{
|
||||
If (!(_grp in UPSMON_SUPPORT_WEST_UNITS)) then {UPSMON_SUPPORT_WEST_UNITS pushback _grp;};
|
||||
}
|
||||
else
|
||||
{
|
||||
If (_grp in UPSMON_SUPPORT_WEST_UNITS) then {UPSMON_SUPPORT_WEST_UNITS = UPSMON_SUPPORT_WEST_UNITS - [_grp];};
|
||||
};
|
||||
|
||||
If ("supply" in _typeofgrp) then
|
||||
{
|
||||
If (!(_grp in UPSMON_SUPPLY_WEST_UNITS)) then {UPSMON_SUPPLY_WEST_UNITS pushback _grp;};
|
||||
}
|
||||
else
|
||||
{
|
||||
If (_grp in UPSMON_SUPPLY_WEST_UNITS) then {UPSMON_SUPPLY_WEST_UNITS = UPSMON_SUPPLY_WEST_UNITS - [_grp];};
|
||||
};
|
||||
};
|
||||
|
||||
case "EAST":
|
||||
{
|
||||
If ("arti" in _typeofgrp) then
|
||||
{
|
||||
If (!(_grp in UPSMON_ARTILLERY_EAST_UNITS)) then {UPSMON_ARTILLERY_EAST_UNITS pushback _grp;};
|
||||
}
|
||||
else
|
||||
{
|
||||
If (_grp in UPSMON_ARTILLERY_EAST_UNITS) then {UPSMON_ARTILLERY_EAST_UNITS = UPSMON_ARTILLERY_EAST_UNITS - [_grp];};
|
||||
};
|
||||
|
||||
If ("plane" in _typeofgrp) then
|
||||
{
|
||||
If (!(_grp in UPSMON_SUPPORT_EAST_UNITS)) then {UPSMON_SUPPORT_EAST_UNITS pushback _grp;};
|
||||
}
|
||||
else
|
||||
{
|
||||
If (_grp in UPSMON_SUPPORT_EAST_UNITS) then {UPSMON_SUPPORT_EAST_UNITS = UPSMON_SUPPORT_EAST_UNITS - [_grp];};
|
||||
};
|
||||
|
||||
If ("supply" in _typeofgrp) then
|
||||
{
|
||||
If (!(_grp in UPSMON_SUPPLY_EAST_UNITS)) then {UPSMON_SUPPLY_EAST_UNITS pushback _grp;};
|
||||
}
|
||||
else
|
||||
{
|
||||
If (_grp in UPSMON_SUPPLY_EAST_UNITS) then {UPSMON_SUPPLY_EAST_UNITS = UPSMON_SUPPLY_EAST_UNITS - [_grp];};
|
||||
};
|
||||
};
|
||||
|
||||
case "RESISTANCE":
|
||||
{
|
||||
If ("arti" in _typeofgrp) then
|
||||
{
|
||||
If (!(_grp in UPSMON_ARTILLERY_GUER_UNITS)) then {UPSMON_ARTILLERY_GUER_UNITS pushback _grp;};
|
||||
}
|
||||
else
|
||||
{
|
||||
If (_grp in UPSMON_ARTILLERY_GUER_UNITS) then {UPSMON_ARTILLERY_GUER_UNITS = UPSMON_ARTILLERY_GUER_UNITS - [_grp];};
|
||||
};
|
||||
|
||||
If ("plane" in _typeofgrp) then
|
||||
{
|
||||
If (!(_grp in UPSMON_SUPPORT_GUER_UNITS)) then {UPSMON_SUPPORT_GUER_UNITS pushback _grp;};
|
||||
}
|
||||
else
|
||||
{
|
||||
If (_grp in UPSMON_SUPPORT_GUER_UNITS) then {UPSMON_SUPPORT_GUER_UNITS = UPSMON_SUPPORT_GUER_UNITS - [_grp];};
|
||||
};
|
||||
|
||||
If ("supply" in _typeofgrp) then
|
||||
{
|
||||
If (!(_grp in UPSMON_SUPPLY_GUER_UNITS)) then {UPSMON_SUPPLY_GUER_UNITS pushback _grp;};
|
||||
}
|
||||
else
|
||||
{
|
||||
If (_grp in UPSMON_SUPPLY_GUER_UNITS) then {UPSMON_SUPPLY_GUER_UNITS = UPSMON_SUPPLY_GUER_UNITS - [_grp];};
|
||||
};
|
||||
};
|
||||
};
|
@ -1,40 +0,0 @@
|
||||
//****************************************************************
|
||||
//File: UPSMON_CanSee.sqf
|
||||
//Author: Azroul13
|
||||
|
||||
//Description:
|
||||
// Check if the unit not facing something that block his view
|
||||
//Parameter(s):
|
||||
// <--- Unit
|
||||
// <--- unit direction
|
||||
// <--- Height
|
||||
//Returns:
|
||||
// boolean
|
||||
//****************************************************************
|
||||
private ["_see","_infront","_uposASL","_opp","_adj","_hyp","_eyes","_obstruction","_angle"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_angle = _this select 1;
|
||||
_hyp = _this select 2;
|
||||
|
||||
|
||||
_eyes = eyepos _unit;
|
||||
|
||||
_adj = _hyp * (cos _angle);
|
||||
_opp = sqrt ((_hyp*_hyp) - (_adj * _adj));
|
||||
|
||||
_infront = if ((_angle) >= 180) then
|
||||
{
|
||||
[(_eyes select 0) - _opp,(_eyes select 1) + _adj,(_eyes select 2)]
|
||||
}
|
||||
else
|
||||
{
|
||||
[(_eyes select 0) + _opp,(_eyes select 1) + _adj,(_eyes select 2)]
|
||||
};
|
||||
|
||||
_obstruction = (lineintersectswith [_eyes,_infront,_unit]) select 0;
|
||||
|
||||
|
||||
_see = if (isnil("_obstruction")) then {true} else {false};
|
||||
|
||||
_see
|
@ -1,19 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_DeleteWP.sqf
|
||||
Author: Azroul13
|
||||
|
||||
Description:
|
||||
delete waypoint for group
|
||||
Parameter(s):
|
||||
<--- group
|
||||
Returns:
|
||||
Nothing
|
||||
****************************************************************/
|
||||
private [];
|
||||
|
||||
while {(count (waypoints _this)) > 0} do
|
||||
{
|
||||
deleteWaypoint ((waypoints _this) select 0);
|
||||
sleep 0.25;
|
||||
};
|
||||
|
@ -1,38 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_DocreateWP.sqf
|
||||
Author: Azroul13
|
||||
|
||||
Description:
|
||||
Create waypoint for group
|
||||
Parameter(s):
|
||||
<--- group
|
||||
<--- position of the waypoint
|
||||
<--- type of the waypoint
|
||||
<--- Formation of the waypoint
|
||||
<--- Behaviour of the waypoint
|
||||
<--- Combatmode of the waypoint
|
||||
<--- Radius of the waypoint
|
||||
Returns:
|
||||
Nothing
|
||||
****************************************************************/
|
||||
private ["_grp","_targetpos","_wptype","_wpformation","_speedmode","_wp1","_radius","_CombatMode"];
|
||||
|
||||
_grp = _this select 0;
|
||||
_targetpos = _this select 1;
|
||||
_wptype = _this select 2;
|
||||
_wpformation = _this select 3;
|
||||
_speedmode = _this select 4;
|
||||
_Behaviour = _this select 5;
|
||||
_CombatMode = _this select 6;
|
||||
_radius = _this select 7;
|
||||
|
||||
|
||||
_wp1 = _grp addWaypoint [_targetPos,count (waypoints _grp)];
|
||||
_wp1 setWaypointPosition [_targetPos,count (waypoints _grp)];
|
||||
_wp1 setWaypointType _wptype;
|
||||
_wp1 setWaypointFormation _wpformation;
|
||||
_wp1 setWaypointSpeed _speedmode;
|
||||
_wp1 setwaypointbehaviour _Behaviour;
|
||||
_wp1 setwaypointCombatMode _CombatMode;
|
||||
_wp1 setWaypointLoiterRadius _radius;
|
||||
if (count _this > 8) then {sleep 3; (vehicle (leader _grp)) flyinheight (_this select 8)};
|
@ -1,41 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_DocreateWP.sqf
|
||||
Author: Azroul13
|
||||
|
||||
Description:
|
||||
Create waypoint for group
|
||||
Parameter(s):
|
||||
<--- group
|
||||
<--- position of the waypoint
|
||||
<--- type of the waypoint
|
||||
<--- Formation of the waypoint
|
||||
<--- Behaviour of the waypoint
|
||||
<--- Combatmode of the waypoint
|
||||
<--- Radius of the waypoint
|
||||
Returns:
|
||||
Nothing
|
||||
****************************************************************/
|
||||
private ["_grp","_targetpos","_wptype","_wpformation","_speedmode","_wp1","_radius","_CombatMode"];
|
||||
|
||||
_grp = _this select 0;
|
||||
_targetpos = _this select 1;
|
||||
_wptype = _this select 2;
|
||||
_wpformation = _this select 3;
|
||||
_speedmode = _this select 4;
|
||||
_Behaviour = _this select 5;
|
||||
_CombatMode = _this select 6;
|
||||
_radius = _this select 7;
|
||||
|
||||
_grp call UPSMON_DeleteWP;
|
||||
|
||||
_wp1 = _grp addWaypoint [_targetPos,0];
|
||||
_wp1 setWaypointPosition [_targetPos,0];
|
||||
_wp1 setWaypointType _wptype;
|
||||
_wp1 setWaypointFormation _wpformation;
|
||||
_wp1 setWaypointSpeed _speedmode;
|
||||
_wp1 setwaypointbehaviour _Behaviour;
|
||||
_wp1 setwaypointCombatMode _CombatMode;
|
||||
_wp1 setWaypointLoiterRadius _radius;
|
||||
//if (count _this > 8) then {sleep 3; (vehicle (leader _grp)) flyinheight (_this select 8)};
|
||||
|
||||
_grp setCurrentWaypoint [_grp,(_wp1 select 1)];
|
@ -1,38 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_GetSIN.sqf
|
||||
Author: MONSADA
|
||||
|
||||
Description:
|
||||
Función que devuelve el valor negativo o positivo del coseno en base a un angulo
|
||||
Parameter(s):
|
||||
|
||||
Returns:
|
||||
|
||||
****************************************************************/
|
||||
private["_dir","_cos"];
|
||||
|
||||
_dir=_this select 0;
|
||||
if (isnil "_dir") exitWith {};
|
||||
if (_dir<90) then
|
||||
{
|
||||
_cos=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_dir<180) then
|
||||
{
|
||||
_cos=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_dir<270) then
|
||||
{
|
||||
_cos=-1;
|
||||
}
|
||||
else
|
||||
{
|
||||
_cos=-1;
|
||||
};
|
||||
};
|
||||
};
|
||||
_cos
|
@ -1,29 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_GetOut.sqf
|
||||
Author: MONSADA
|
||||
|
||||
Description:
|
||||
Function for order a unit to exit if no gunner
|
||||
Parameter(s):
|
||||
|
||||
Returns:
|
||||
|
||||
****************************************************************/
|
||||
private["_vehicle","_npc","_getout" ,"_gunner"];
|
||||
|
||||
_npc = _this;
|
||||
_vehicle = vehicle (_npc);
|
||||
_gunner = objnull;
|
||||
_gunner = gunner _vehicle;
|
||||
|
||||
sleep 0.05;
|
||||
if (!alive _npc) exitwith{};
|
||||
|
||||
//If no leave the vehicle gunner
|
||||
if ( isnull _gunner || !alive _gunner || !canmove _gunner || (_gunner != _npc && driver _vehicle != _npc && commander _vehicle != _npc) ) then {
|
||||
[_npc] allowGetIn false;
|
||||
_npc spawn UPSMON_doGetOut;
|
||||
unassignVehicle _npc;
|
||||
|
||||
//sleep 0.2;
|
||||
};
|
@ -1,29 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_GetPos2D.sqf
|
||||
Author: MONSADA
|
||||
|
||||
Description:
|
||||
Función que devuelve una posición en 2D a partir de otra, una dirección y una distancia
|
||||
Parameter(s):
|
||||
<--- Position
|
||||
<--- Direction
|
||||
<--- Distance
|
||||
Returns:
|
||||
Position
|
||||
****************************************************************/
|
||||
private ["_pos","_dir","_dist","_cosU","_cosT","_relTX","_sinU","_sinT","_relTY","_newPos","_newPosX","_newPosY" ];
|
||||
|
||||
_pos = _this select 0;
|
||||
_dir = _this select 1;
|
||||
_dist = _this select 2;
|
||||
|
||||
if (isnil "_pos") exitWith {};
|
||||
_targetX = _pos select 0; _targetY = _pos select 1;
|
||||
|
||||
//Calculamos posición
|
||||
_cosU = [_dir] call UPSMON_GetCOS; _sinU = [_dir] call UPSMON_GetSIN;
|
||||
_cosT = abs cos(_dir); _sinT = abs sin(_dir);
|
||||
_relTX = _sinT * _dist * _cosU; _relTY = _cosT * _dist * _sinU;
|
||||
_newPosX = _targetX + _relTX; _newPosY = _targetY + _relTY;
|
||||
_newPos = [_newPosX,_newPosY];
|
||||
_newPos;
|
@ -1,38 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_GetSIN.sqf
|
||||
Author: MONSADA
|
||||
|
||||
Description:
|
||||
Función que devuelve el valor negativo o positivo del seno en base a un angulo
|
||||
Parameter(s):
|
||||
|
||||
Returns:
|
||||
|
||||
****************************************************************/
|
||||
private["_dir","_sin","_cos"];
|
||||
|
||||
_dir=_this select 0;
|
||||
if (isnil "_dir") exitWith {};
|
||||
if (_dir<90) then
|
||||
{
|
||||
_sin=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_dir<180) then
|
||||
{
|
||||
_sin=-1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_dir<270) then
|
||||
{
|
||||
_sin=-1;
|
||||
}
|
||||
else
|
||||
{
|
||||
_sin=1;
|
||||
};
|
||||
};
|
||||
};
|
||||
_sin
|
@ -1,34 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_Getnearestplayer.sqf
|
||||
Author: Azroul13
|
||||
|
||||
Description:
|
||||
Get the nearest player near the position.
|
||||
Parameter(s):
|
||||
<--- Position
|
||||
<--- Distance
|
||||
Returns:
|
||||
Nearest unit or ObjNull
|
||||
****************************************************************/
|
||||
private ["_position","_nearestdist","_height","_nearest","_haslos"];
|
||||
|
||||
_position = _this select 0;
|
||||
_nearestdist = _this select 1;
|
||||
|
||||
_nearest = objNull;
|
||||
|
||||
{
|
||||
if (isPlayer _x) then
|
||||
{
|
||||
If ((getposATL _x) select 2 <= 100) then
|
||||
{
|
||||
If ((getposATL _x vectorDistance [_position select 0,_position select 1,0]) <= _nearestdist) exitwith
|
||||
{
|
||||
_nearest=_x;
|
||||
};
|
||||
};
|
||||
};
|
||||
} forEach playableUnits;
|
||||
|
||||
//playableUnits;
|
||||
_nearest
|
@ -1,30 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_Getunitsincargo.sqf
|
||||
Author: Azroul13
|
||||
|
||||
Description:
|
||||
Function for order a unit to exit if no gunner
|
||||
Parameter(s):
|
||||
|
||||
Returns:
|
||||
|
||||
****************************************************************/
|
||||
private["_vehicle","_unitsincargo","_crew"];
|
||||
|
||||
_vehicle = _this select 0;
|
||||
|
||||
_unitsincargo = [];
|
||||
|
||||
_crew = crew _vehicle;
|
||||
|
||||
{
|
||||
If (alive _x) then
|
||||
{
|
||||
If () then
|
||||
{
|
||||
_unitsincargo pushback _x;
|
||||
};
|
||||
};
|
||||
} foreach _crew;
|
||||
|
||||
_unitsincargo
|
@ -1,49 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_Haslos.sqf
|
||||
Author: Azroul13
|
||||
|
||||
Description:
|
||||
|
||||
Parameter(s):
|
||||
<--- unit
|
||||
<--- Target
|
||||
<--- Max distance the unit can see the target
|
||||
<--- Field of view of the unit
|
||||
Returns:
|
||||
Boolean
|
||||
****************************************************************/
|
||||
|
||||
private ["_unit", "_target", "_range", "_fov","_eyeVector","_eyeDirection","_eyePosition","_targetPosition", "_inRange", "_result"];
|
||||
|
||||
_unit = [_this,0] call BIS_fnc_param;
|
||||
_target = [_this,1] call BIS_fnc_param;
|
||||
_range = [_this,2,100,[0]] call BIS_fnc_param;
|
||||
_fov = [_this,3,130,[0]] call BIS_fnc_param;
|
||||
|
||||
_result = false;
|
||||
_inRange = ((getposATL _unit) vectordistance (getposATL _target)) < _range;
|
||||
_eyeVector = eyeDirection _unit;
|
||||
_eyeDirection = ((_eyeVector select 0) atan2 (_eyeVector select 1));
|
||||
_eyePosition = eyePos _unit;
|
||||
_targetPosition = eyePos _target;
|
||||
|
||||
If (!(_target iskindof "CAManBase")) then
|
||||
{
|
||||
_targetPosition = aimpos _target;
|
||||
};
|
||||
|
||||
if (_inRange) then
|
||||
{
|
||||
if ([_eyePosition, _eyeDirection, _fov, _targetPosition] call BIS_fnc_inAngleSector) then
|
||||
{
|
||||
if (!lineIntersects[_eyePosition, _targetPosition, vehicle _unit, vehicle _target]) then
|
||||
{
|
||||
if (!terrainIntersectASL[_eyePosition, _targetPosition]) then
|
||||
{
|
||||
_result = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_result;
|
@ -1,32 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_LOS.sqf
|
||||
Author: Azroul13
|
||||
|
||||
Description:
|
||||
|
||||
Parameter(s):
|
||||
<--- position to check
|
||||
<--- Target position
|
||||
Returns:
|
||||
Boolean
|
||||
****************************************************************/
|
||||
|
||||
private ["_poso","_posd","_los_ok"];
|
||||
|
||||
_poso = _this select 0;
|
||||
_posd = _this select 1;
|
||||
|
||||
_poso = [_poso select 0, _poso select 1, (getTerrainHeightASL [_poso select 0, _poso select 1]) +1];
|
||||
_posd = [_posd select 0, _posd select 1, (getTerrainHeightASL [_posd select 0, _posd select 1]) +1];
|
||||
|
||||
_los_ok = false;
|
||||
If (!terrainIntersectASL [_poso,_posd]) then
|
||||
{
|
||||
//lineIntersects [_poso, _posd]
|
||||
If (count (lineintersectsobjs [_poso,_posd,objnull,objnull,false]) == 0) then
|
||||
{
|
||||
_los_ok = true;
|
||||
};
|
||||
};
|
||||
|
||||
_los_ok;
|
@ -1,24 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_timeloop.sqf
|
||||
Author: CarlGustav
|
||||
|
||||
Description:
|
||||
|
||||
Parameter(s):
|
||||
|
||||
Returns:
|
||||
|
||||
****************************************************************/
|
||||
|
||||
private ["_lat","_day","_hour","_sunangle","_Night"];
|
||||
|
||||
_Night = false;
|
||||
_lat = -1 * getNumber(configFile >> "CfgWorlds" >> worldName >> "latitude");
|
||||
_day = 360 * (dateToNumber date);
|
||||
_hour = (daytime / 24) * 360;
|
||||
_sunangle = ((12 * cos(_day) - 78) * cos(_lat) * cos(_hour)) - (24 * sin(_lat) * cos(_day));
|
||||
|
||||
If (_sunangle < 0) then {_Night = true;};
|
||||
If (_sunangle > 0) then {_Night = False;};
|
||||
|
||||
_Night;
|
@ -1,62 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_Nowp.sqf
|
||||
Author: Azroul13
|
||||
|
||||
Description:
|
||||
|
||||
Parameter(s):
|
||||
|
||||
Returns:
|
||||
|
||||
****************************************************************/
|
||||
|
||||
private ["_grp","_target","_supstatus","_nowp"];
|
||||
|
||||
_grp = _this select 0;
|
||||
_target = _this select 1;
|
||||
_supstatus = _this select 2;
|
||||
|
||||
_nowp = true;
|
||||
|
||||
If (_grp getvariable ["UPSMON_NOWP",0] == 0) then
|
||||
{
|
||||
If (_grp getvariable ["UPSMON_Grpmission",""] != "AMBUSH") then
|
||||
{
|
||||
If (_grp getvariable ["UPSMON_Grpmission",""] != "FORTIFY") then
|
||||
{
|
||||
If (_grp getvariable ["UPSMON_Grpmission",""] != "RETREAT") then
|
||||
{
|
||||
If (_grp getvariable ["UPSMON_Grpmission",""] != "SURRENDER") then
|
||||
{
|
||||
_nowp = false;
|
||||
};
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (_grp getvariable ["UPSMON_NOWP",0]) do
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
If (!IsNull _target) then
|
||||
{
|
||||
_nowp = false;
|
||||
};
|
||||
};
|
||||
case 2:
|
||||
{
|
||||
If (_supstatus == "INCAPACITED") then
|
||||
{
|
||||
_nowp = false;
|
||||
};
|
||||
};
|
||||
case 3:
|
||||
{
|
||||
//Always Nowp = true
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_nowp
|
@ -1,37 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_Replace.sqf
|
||||
Author: KRONZKY
|
||||
|
||||
Description:
|
||||
|
||||
Parameter(s):
|
||||
|
||||
Returns:
|
||||
|
||||
****************************************************************/
|
||||
private["_str","_old","_new","_out","_tmp","_jm","_la","_lo","_ln","_i"];
|
||||
|
||||
_str=_this select 0;
|
||||
_arr=toArray(_str);
|
||||
_la=count _arr;
|
||||
_old=_this select 1;
|
||||
_new=_this select 2;
|
||||
_na=[_new] call UPSMON_StrToArray;
|
||||
_lo=[_old] call UPSMON_StrLen;
|
||||
_ln=[_new] call UPSMON_StrLen;
|
||||
_out="";
|
||||
for "_i" from 0 to (count _arr)-1 do {
|
||||
_tmp="";
|
||||
if (_i <= _la-_lo) then {
|
||||
for "_j" from _i to (_i+_lo-1) do {
|
||||
_tmp=_tmp + toString([_arr select _j]);
|
||||
};
|
||||
};
|
||||
if (_tmp==_old) then {
|
||||
_out=_out+_new;
|
||||
_i=_i+_lo-1;
|
||||
} else {
|
||||
_out=_out+toString([_arr select _i]);
|
||||
};
|
||||
};
|
||||
_out
|
@ -1,24 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_SN_EHFIREDNEAR.sqf
|
||||
Author: Rafalsky
|
||||
|
||||
Description:
|
||||
|
||||
Parameter(s):
|
||||
|
||||
Returns:
|
||||
|
||||
****************************************************************/
|
||||
private ["_unit","_shooter","_dist"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_shooter = _this select 1;
|
||||
_dist = _this select 2;
|
||||
|
||||
If (alive _unit) then
|
||||
{
|
||||
If (!(_unit getvariable ["UPSMON_Civfleeing",false])) then
|
||||
{
|
||||
["FLEE",_unit,_shooter,_dist] spawn UPSMON_Civaction;
|
||||
};
|
||||
};
|
@ -1,24 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_SN_EHHIT.sqf
|
||||
Author: Rafalsky
|
||||
|
||||
Description:
|
||||
|
||||
Parameter(s):
|
||||
|
||||
Returns:
|
||||
|
||||
****************************************************************/
|
||||
private ["_unit","_shooter","_grpId"];
|
||||
_unit = _this select 0;
|
||||
_shooter = _this select 1;
|
||||
_grp = group _unit;
|
||||
|
||||
if (!(_unit in UPSMON_GOTHIT_ARRAY)) then
|
||||
{
|
||||
if (side _unit != side _shooter) then
|
||||
{
|
||||
UPSMON_GOTHIT_ARRAY pushback _unit;
|
||||
if (UPSMON_Debug > 0) then {player globalchat format["UNIT: %1, SHOOTER :%2 %3",_unit,_shooter,side _shooter]};
|
||||
};
|
||||
};
|
@ -1,40 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_SN_EHHIT.sqf
|
||||
Author: Rafalsky
|
||||
|
||||
Description:
|
||||
|
||||
Parameter(s):
|
||||
|
||||
Returns:
|
||||
|
||||
****************************************************************/
|
||||
private ["_unit","_shooter","_grpId"];
|
||||
_unit = _this select 0;
|
||||
_shooter = _this select 1;
|
||||
_grp = group _unit;
|
||||
|
||||
|
||||
if (!(_unit in UPSMON_GOTKILL_ARRAY)) then
|
||||
{
|
||||
if (side _unit != side _shooter) then
|
||||
{
|
||||
_alliednear = false;
|
||||
|
||||
{
|
||||
if (alive _x) then
|
||||
{
|
||||
if (getposATL _unit vectordistance getposATL _x <= 30) exitwith
|
||||
{
|
||||
_alliednear = true;
|
||||
};
|
||||
};
|
||||
} foreach units _grp;
|
||||
|
||||
If (_alliednear) then
|
||||
{
|
||||
UPSMON_GOTKILL_ARRAY pushback _unit;
|
||||
//if (UPSMON_Debug > 0) then {player globalchat format["UNIT: %1, SHOOTER :%2 %3",_unit,_shooter,side _shooter]};
|
||||
};
|
||||
};
|
||||
};
|
@ -1,51 +0,0 @@
|
||||
/****************************************************************
|
||||
File: R_SN_EHKILLEDCIV.sqf
|
||||
Author: Rafalsky
|
||||
|
||||
Description:
|
||||
|
||||
Parameter(s):
|
||||
|
||||
Returns:
|
||||
|
||||
****************************************************************/
|
||||
private ["_killer","_side"];
|
||||
|
||||
_killer = _this select 1;
|
||||
|
||||
//only if player killed a civilian
|
||||
if (isPlayer _killer) then
|
||||
{
|
||||
KILLED_CIV_COUNTER set [0,(KILLED_CIV_COUNTER select 0) + 1];
|
||||
|
||||
// if (UPSMON_Debug > 0) then {player globalchat format["KILLER: %1, %2", side _killer,KILLED_CIV_COUNTER ]};
|
||||
switch (side _killer) do
|
||||
{
|
||||
case west:
|
||||
{
|
||||
KILLED_CIV_COUNTER set [1,(KILLED_CIV_COUNTER select 1) + 1];
|
||||
UPSMON_WEST_HM = UPSMON_WEST_HM - UPSMON_Ammountofhostility;
|
||||
};
|
||||
|
||||
case east:
|
||||
{
|
||||
KILLED_CIV_COUNTER set [2,(KILLED_CIV_COUNTER select 2) + 1];
|
||||
UPSMON_EAST_HM = UPSMON_EAST_HM - UPSMON_Ammountofhostility;
|
||||
};
|
||||
|
||||
case resistance:
|
||||
{
|
||||
KILLED_CIV_COUNTER set [3,(KILLED_CIV_COUNTER select 3) + 1];
|
||||
UPSMON_GUER_HM = UPSMON_GUER_HM - UPSMON_Ammountofhostility;
|
||||
};
|
||||
};
|
||||
|
||||
KILLED_CIV_COUNTER set [4,_killer];
|
||||
|
||||
//if (UPSMON_Debug > 0) then {player globalchat format["KILLER: %1", side _killer ]};
|
||||
if (UPSMON_Debug > 0) then {player globalchat format["KILLED_CIV_COUNTER: %1",KILLED_CIV_COUNTER]};
|
||||
if (R_WHO_IS_CIV_KILLER_INFO > 0) then
|
||||
{
|
||||
call compile format ["[{UPSMON_Logic_civkill globalChat ""A CIVILIAN WAS KILLED BY %1"";},""BIS_fnc_spawn""] call BIS_fnc_MP;",name _killer];
|
||||
};
|
||||
};
|
@ -1,16 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_StrInStr.sqf
|
||||
Author: KRONZKY
|
||||
|
||||
Description:
|
||||
|
||||
Parameter(s):
|
||||
|
||||
Returns:
|
||||
|
||||
****************************************************************/
|
||||
private["_out"];
|
||||
|
||||
_in=_this select 0;
|
||||
_out=if (([_this select 0,_this select 1] call UPSMON_StrIndex)==-1) then {false} else {true};
|
||||
_out
|
@ -1,31 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_StrIndex.sqf
|
||||
Author: KRONZKY
|
||||
|
||||
Description:
|
||||
|
||||
Parameter(s):
|
||||
|
||||
Returns:
|
||||
|
||||
****************************************************************/
|
||||
private["_hay","_ndl","_lh","_ln","_arr","_tmp","_i","_j","_out"];
|
||||
|
||||
_hay=_this select 0;
|
||||
_ndl=_this select 1;
|
||||
_out=-1;
|
||||
_i=0;
|
||||
if (_hay == _ndl) exitWith {0};
|
||||
_lh=[_hay] call UPSMON_StrLen;
|
||||
_ln=[_ndl] call UPSMON_StrLen;
|
||||
if (_lh < _ln) exitWith {-1};
|
||||
_arr=[_hay] call UPSMON_StrToArray;
|
||||
for "_i" from 0 to (_lh-_ln) do
|
||||
{
|
||||
_tmp="";
|
||||
for "_j" from _i to (_i+_ln-1) do {
|
||||
_tmp=_tmp + (_arr select _j);
|
||||
};
|
||||
if (_tmp==_ndl) exitWith {_out=_i};
|
||||
};
|
||||
_out
|
@ -1,17 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_StrLen.sqf
|
||||
Author: KRONZKY
|
||||
|
||||
Description:
|
||||
|
||||
Parameter(s):
|
||||
|
||||
Returns:
|
||||
|
||||
****************************************************************/
|
||||
private["_in","_arr","_len"];
|
||||
|
||||
_in=_this select 0;
|
||||
_arr=[_in] call UPSMON_StrToArray;
|
||||
_len=count (_arr);
|
||||
_len
|
@ -1,20 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_StrToArray.sqf
|
||||
Author: KRONZKY
|
||||
|
||||
Description:
|
||||
|
||||
Parameter(s):
|
||||
|
||||
Returns:
|
||||
|
||||
****************************************************************/
|
||||
private["_in","_i","_arr","_out"];
|
||||
|
||||
_in=_this select 0;
|
||||
_arr = toArray(_in);
|
||||
_out=[];
|
||||
for "_i" from 0 to (count _arr)-1 do {
|
||||
_out=_out+[toString([_arr select _i])];
|
||||
};
|
||||
_out
|
@ -1,107 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_TRACK.sqf
|
||||
Author: Azroul13
|
||||
|
||||
Description:
|
||||
|
||||
Parameter(s):
|
||||
|
||||
Returns:
|
||||
|
||||
****************************************************************/
|
||||
private ["_grpid","_leader","_pos","_rankshort","_lastname","_wppos","_markercolor","_grptype","_drawicon","_text","_trackername","_destname"];
|
||||
|
||||
|
||||
While {true} do
|
||||
{
|
||||
{
|
||||
If (!IsNull _x) then
|
||||
{
|
||||
If (alive (leader _x)) then
|
||||
{
|
||||
_grpid = _x getvariable ["UPSMON_grpid",0];
|
||||
_leader = leader _x;
|
||||
_pos = getposATL _leader;
|
||||
_rankshort = [rank _leader,"displayNameShort"] call BIS_fnc_rankparams;
|
||||
_lastname = name _leader;
|
||||
_units = (units _x) - [_leader];
|
||||
|
||||
_wppos = waypointPosition [_x,count(waypoints _x)-1];
|
||||
|
||||
_markercolor = switch (side _leader) do {
|
||||
case west: {"ColorBlue"};
|
||||
case east: {"ColorRed"};
|
||||
case resistance: {"ColorGreen"};
|
||||
default {"ColorBlack"};
|
||||
};
|
||||
|
||||
_grptype = [_leader] call UPSMON_grptype;
|
||||
_drawicon = "b_inf";
|
||||
If (_grptype == "Iscar") then {_drawicon = "b_motor_inf"};
|
||||
If (_grptype == "IsAir") then {_drawicon = "b_plane";};
|
||||
If (_grptype == "Isboat") then {_drawicon = "b_naval";};
|
||||
|
||||
_text = format ["%1. %2 - Grpcount: %3 - Mission: %4 Status: %5 - Target: %6",_rankshort, _lastname,count units _x,_x getvariable ["UPSMON_Grpmission","PATROL"],_x getvariable ["UPSMON_Grpstatus","GREEN"],_x getvariable ["UPSMON_GrpTarget",ObjNull]];
|
||||
|
||||
_trackername = format["trk_%1",_grpid];
|
||||
|
||||
if (getMarkerColor _trackername == "") then
|
||||
{
|
||||
_markerlead = createMarker [_trackername,[0,0]];
|
||||
};
|
||||
_trackername setMarkerShape "ICON";
|
||||
_trackername setMarkerType _drawicon;
|
||||
_trackername setmarkerpos _pos;
|
||||
_trackername setmarkercolor _markercolor;
|
||||
_trackername setMarkerText _text;
|
||||
|
||||
If (count(waypoints _x) != 0) then
|
||||
{
|
||||
_destname = format["dest_%1",_grpid];
|
||||
_wptext = format ["%1. %2",_rankshort, _lastname];
|
||||
if (getMarkerColor _destname == "") then
|
||||
{
|
||||
_markerobj = createMarker[_destname,[0,0]];
|
||||
};
|
||||
_destname setMarkerShape "ICON";
|
||||
_destname setMarkerType "mil_objective";
|
||||
_destname setmarkerpos _wppos;
|
||||
_destname setmarkercolor _markercolor;
|
||||
_destname setMarkerText _wptext;
|
||||
};
|
||||
|
||||
If (count _units > 0) then
|
||||
{
|
||||
_i = 0;
|
||||
{
|
||||
_i = _i + 1;
|
||||
_trackerunit = format["trk_%1_%2",_grpid,_i];
|
||||
_unit = _x;
|
||||
If (alive _unit) then
|
||||
{
|
||||
_pos2 = getposATL _unit;
|
||||
if (getMarkerColor _trackerunit == "") then
|
||||
{
|
||||
_markerunit = createMarker [_trackerunit,[0,0]];
|
||||
};
|
||||
_trackerunit setMarkerShape "ICON";
|
||||
_trackerunit setMarkerType "mil_triangle";
|
||||
_trackerunit setmarkerpos _pos2;
|
||||
_trackerunit setmarkercolor _markercolor;
|
||||
_trackerunit setmarkerdir (getdir _unit);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (getMarkerColor _trackerunit == "") then
|
||||
{
|
||||
Deletemarker _trackerunit;
|
||||
};
|
||||
};
|
||||
} foreach _units;
|
||||
};
|
||||
};
|
||||
};
|
||||
} foreach UPSMON_Trackednpcs;
|
||||
|
||||
sleep 0.5;
|
||||
};
|
@ -1,132 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_TRACK.sqf
|
||||
Author: Azroul13
|
||||
|
||||
Description:
|
||||
|
||||
Parameter(s):
|
||||
|
||||
Returns:
|
||||
|
||||
****************************************************************/
|
||||
private ["_grp"];
|
||||
|
||||
|
||||
_grp = _this select 0;
|
||||
If !(_grp in UPSMON_Trackednpcs) then {UPSMON_Trackednpcs set [count UPSMON_Trackednpcs,_grp];};
|
||||
_eh = ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler
|
||||
["Draw",
|
||||
'
|
||||
{
|
||||
If (!IsNull _x) then
|
||||
{
|
||||
if (count units _x > 0) then
|
||||
{
|
||||
_leader = leader _x;
|
||||
_rankshort = [rank _leader,"displayNameShort"] call BIS_fnc_rankparams;
|
||||
_lastname = name _leader;
|
||||
_scale = (sizeof typeof _leader) / 30;
|
||||
_units = (units _x) - [_leader];
|
||||
_colorblufor = [(profilenamespace getvariable ["Map_BLUFOR_R",0]),(profilenamespace getvariable ["Map_BLUFOR_G",1]),(profilenamespace getvariable ["Map_BLUFOR_B",1]),(profilenamespace getvariable ["Map_BLUFOR_A",0.8])];
|
||||
_coloropfor = [(profilenamespace getvariable ["Map_OPFOR_R",0]),(profilenamespace getvariable ["Map_OPFOR_G",1]),(profilenamespace getvariable ["Map_OPFOR_B",1]),(profilenamespace getvariable ["Map_OPFOR_A",0.8])];
|
||||
_colorindfor = [(profilenamespace getvariable ["Map_Independent_R",0]),(profilenamespace getvariable ["Map_Independent_G",1]),(profilenamespace getvariable ["Map_Independent_B",1]),(profilenamespace getvariable ["Map_Independent_A",0.8])];
|
||||
_colorciv = [(profilenamespace getvariable ["Map_Civilian_R",0]),(profilenamespace getvariable ["Map_Civilian_G",1]),(profilenamespace getvariable ["Map_Civilian_B",1]),(profilenamespace getvariable ["Map_Civilian_A",0.8])];
|
||||
_color = [];
|
||||
if (side _leader == west) then {_color = _colorblufor;};
|
||||
if (side _leader == east) then {_color = _coloropfor;};
|
||||
if (side _leader == resistance) then {_color = _colorindfor;};
|
||||
if (side _leader == civilian) then {_color = _colorciv;};
|
||||
|
||||
_align = "right";
|
||||
_fontsize = 0.04;
|
||||
|
||||
_grptype = [_leader] call UPSMON_grptype;
|
||||
_drawicon = configfile >> "CfgMarkers" >> "b_inf" >> "icon";
|
||||
_drawwpicon = configfile >> "CfgMarkers" >> "mil_objective" >> "icon";
|
||||
If (_grptype == "Iscar") then {_drawicon = configfile >> "CfgMarkers" >> "b_motor_inf" >> "icon";};
|
||||
If (_grptype == "IsAir") then {_drawicon = configfile >> "CfgMarkers" >> "b_plane" >> "icon";};
|
||||
If (_grptype == "Isboat") then {_drawicon = configfile >> "CfgMarkers" >> "b_naval" >> "icon";};
|
||||
|
||||
_align = "left";
|
||||
_textwp = "";
|
||||
_text = format ["%1. %2 - Grpcount: %3 - Mission: %4 Status: %5 - Target: %6",_rankshort, _lastname,count units _x,_x getvariable ["UPSMON_Grpmission","PATROL"],_x getvariable ["UPSMON_Grpstatus","GREEN"],_x getvariable ["UPSMON_GrpTarget",ObjNull]];
|
||||
|
||||
(_this select 0) drawIcon [
|
||||
getText _drawicon,
|
||||
_color,
|
||||
visiblePosition _leader,
|
||||
0.5/ctrlMapScale (_this select 0),
|
||||
0.5/ctrlMapScale (_this select 0),
|
||||
direction _leader,
|
||||
--,
|
||||
1,
|
||||
_fontsize,
|
||||
"TahomaB",
|
||||
_align
|
||||
];
|
||||
If (count(waypoints _x) != 0) then
|
||||
{
|
||||
_wppos = waypointPosition [_x,count(waypoints _x)-1];
|
||||
(_this select 0) drawIcon [getText (_drawwpicon), _color,_wppos, 0.5/ctrlMapScale (_this select 0), 0.5/ctrlMapScale (_this select 0), direction _leader, _textwp, 1, _fontsize, "TahomaB", _align];
|
||||
};
|
||||
_behcolor = [1,1,1,1];
|
||||
if (behaviour _leader == "SAFE") then {_behcolor = [0,0.8,0,1]};
|
||||
if (behaviour _leader == "AWARE") then {_behcolor = [0.85,0.85,0,1]};
|
||||
if (behaviour _leader == "COMBAT") then {_behcolor = [0.9,0,0,1]};
|
||||
if (behaviour _leader == "STEALTH") then {_behcolor = [0,0,1,1]};
|
||||
if !(((expectedDestination _leader) select 0) select 0 < 1 AND ((expectedDestination _leader) select 0) select 1 < 1) then
|
||||
{
|
||||
(_this select 0) drawArrow [
|
||||
visiblePosition _leader,
|
||||
((expectedDestination _leader) select 0),
|
||||
_behcolor
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
} foreach UPSMON_Trackednpcs
|
||||
'
|
||||
];
|
||||
|
||||
/****************************************************************
|
||||
_eh = ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler
|
||||
[
|
||||
"Draw"
|
||||
,'
|
||||
_leader = leader _grp;
|
||||
_rankshort = [rank _leader,"displayNameShort"] call BIS_fnc_rankparams;
|
||||
_lastname = name _leader;
|
||||
_scale = (sizeof typeof _leader) / 30;
|
||||
_colorblufor = [(profilenamespace getvariable ["Map_BLUFOR_R",0]),(profilenamespace getvariable ["Map_BLUFOR_G",1]),(profilenamespace getvariable ["Map_BLUFOR_B",1]),(profilenamespace getvariable ["Map_BLUFOR_A",0.8])];
|
||||
_coloropfor = [(profilenamespace getvariable ["Map_OPFOR_R",0]),(profilenamespace getvariable ["Map_OPFOR_G",1]),(profilenamespace getvariable ["Map_OPFOR_B",1]),(profilenamespace getvariable ["Map_OPFOR_A",0.8])];
|
||||
_colorindfor = [(profilenamespace getvariable ["Map_Independent_R",0]),(profilenamespace getvariable ["Map_Independent_G",1]),(profilenamespace getvariable ["Map_Independent_B",1]),(profilenamespace getvariable ["Map_Independent_A",0.8])];
|
||||
_colorciv = [(profilenamespace getvariable ["Map_Civilian_R",0]),(profilenamespace getvariable ["Map_Civilian_G",1]),(profilenamespace getvariable ["Map_Civilian_B",1]),(profilenamespace getvariable ["Map_Civilian_A",0.8])];
|
||||
_color = [];
|
||||
if (side _leader == west) then {_color = _colorblufor;};
|
||||
if (side _leader == east) then {_color = _coloropfor;};
|
||||
if (side _leader == resistance) then {_color = _colorindfor;};
|
||||
if (side _leader == civilian) then {_color = _colorciv;};
|
||||
|
||||
_align = "right";
|
||||
_fontsize = 0.04;
|
||||
|
||||
_grptype = [_leader] call UPSMON_grptype;
|
||||
_drawicon = configfile >> "CfgMarkers" >> "b_inf" >> "icon";
|
||||
If (_grptype == "Iscar") then {_drawicon = configfile >> "CfgMarkers" >> "b_motor_inf" >> "icon";};
|
||||
If (_grptype == "IsAir") then {_drawicon = configfile >> "CfgMarkers" >> "b_plane" >> "icon";};
|
||||
If (_grptype == "Isboat") then {_drawicon = configfile >> "CfgMarkers" >> "b_naval" >> "icon";};
|
||||
|
||||
_align = "left";
|
||||
_unitshit = [];
|
||||
{if (damage _x >= 0.65) then {_unitshit set [count _unitshit,_x];}}foreach units _leader;
|
||||
_text = format ["%1. %2 - Grpcount: %3 - Wounding units: %4",_rankshort, _lastname,count units group _leader,count _unitshit];
|
||||
|
||||
(_this select 0) drawIcon [getText (_drawicon), _color, visiblePosition _leader, 0.5/ctrlMapScale (_this select 0), 0.5/ctrlMapScale (_this select 0), direction _leader, _text, 1, _fontsize, "TahomaB", _align];
|
||||
_behcolor = [1,1,1,1];
|
||||
if (behaviour _leader == "SAFE") then {_behcolor = [0.85,0.85,0,1]};
|
||||
if (behaviour _leader == "AWARE") then {_behcolor = [0,0.8,0,1]};
|
||||
if (behaviour _leader == "COMBAT") then {_behcolor = [0.9,0,0,1]};
|
||||
if (behaviour _leader == "STEALTH") then {_behcolor = [0,0,1,1]};
|
||||
if !(((expectedDestination _leader) select 0) select 0 < 1 AND ((expectedDestination _leader) select 0) select 1 < 1) then { (_this select 0) drawArrow [visiblePosition _leader, ((expectedDestination _leader) select 0), _behcolor];};'
|
||||
];
|
||||
****************************************************************/
|
@ -1,26 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_arrayShufflePlus.sqf
|
||||
Author: KillZoneKid
|
||||
|
||||
Description:
|
||||
|
||||
Parameter(s):
|
||||
<--- Array
|
||||
Returns:
|
||||
Array
|
||||
****************************************************************/
|
||||
|
||||
private ["_cnt","_el1","_rnd","_indx","_el2"];
|
||||
|
||||
_cnt = count _this - 1;
|
||||
_el1 = _this select _cnt;
|
||||
_this resize _cnt;
|
||||
_rnd = random diag_tickTime * _cnt;
|
||||
for "_i" from 0 to _cnt do {
|
||||
_indx = floor random _rnd % _cnt;
|
||||
_el2 = _this select _indx;
|
||||
_this set [_indx, _el1];
|
||||
_el1 = _el2;
|
||||
};
|
||||
_this set [_cnt, _el1];
|
||||
_this
|
@ -1,30 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_checkbackpack.sqf
|
||||
Author: Azroul13
|
||||
|
||||
Description:
|
||||
|
||||
Parameter(s):
|
||||
<--- bagpack
|
||||
Returns:
|
||||
---> Gun type classname
|
||||
---> tripod type classname
|
||||
****************************************************************/
|
||||
private ["_bagpack","_cfg","_parents","_result","_gun","_tripod","_gun"];
|
||||
|
||||
_bagpack = _this select 0;
|
||||
_cfg = (configFile >> "cfgVehicles" >> _bagpack);
|
||||
_parents = [_cfg,true] call BIS_fnc_returnParents;
|
||||
|
||||
_result = [];
|
||||
_gun = "";
|
||||
_tripod = [];
|
||||
|
||||
if ("Weapon_Bag_Base" in _parents) then
|
||||
{
|
||||
_gun = gettext (configFile >> "cfgVehicles" >> _bagpack >> "assembleInfo" >> "assembleTo");
|
||||
_tripod = getarray (configFile >> "cfgVehicles" >> _bagpack >> "assembleInfo" >> "base");
|
||||
_result = [_gun,_tripod];
|
||||
};
|
||||
|
||||
_result
|
@ -1,33 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_createmarker.sqf
|
||||
Author: Azroul13
|
||||
|
||||
Description:
|
||||
|
||||
Parameter(s):
|
||||
|
||||
Returns:
|
||||
|
||||
****************************************************************/
|
||||
private["_pos","_m","_shape","_type","_color","_size"];
|
||||
|
||||
_pos = _this select 0;
|
||||
_shape = _this select 1;
|
||||
_type = _this select 2;
|
||||
_color = _this select 3;
|
||||
_size = 1;
|
||||
If (count _this > 4) then {_size = _this select 4;};
|
||||
|
||||
_m = createMarker [format["mPos%1%2",(floor(_pos select 0)),(floor(_pos select 1))],_pos];
|
||||
_m setmarkerColor _color;
|
||||
_m setMarkerShape _shape;
|
||||
If (_shape != "ICON") then
|
||||
{
|
||||
_m setMarkerSize _size;
|
||||
_m setMarkerBrush _type
|
||||
}
|
||||
else
|
||||
{
|
||||
_m setMarkerType _type;
|
||||
If (count _this > 4) then {_m setMarkerText (_this select 4);};
|
||||
};
|
@ -1,18 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_createmarker.sqf
|
||||
Author: Azroul13
|
||||
|
||||
Description:
|
||||
|
||||
Parameter(s):
|
||||
|
||||
Returns:
|
||||
|
||||
****************************************************************/
|
||||
private["_pos","_sign","_type"];
|
||||
|
||||
_pos = _this select 0;
|
||||
_type = _this select 1;
|
||||
|
||||
_sign = _type createvehicle [0,0,0];
|
||||
_sign setpos _pos;
|
@ -1,18 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_deleteDead.sqf
|
||||
Author: KRONZKY
|
||||
|
||||
Description:
|
||||
|
||||
Parameter(s):
|
||||
|
||||
Returns:
|
||||
|
||||
****************************************************************/
|
||||
private["_u","_s"];
|
||||
|
||||
_u=_this select 0;
|
||||
_s= _this select 1;
|
||||
_u removeAllEventHandlers "killed";
|
||||
sleep _s;
|
||||
deletevehicle _u
|
@ -1,12 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_distancePosSqr.sqf
|
||||
Author: KRONZKY
|
||||
|
||||
Description:
|
||||
|
||||
Parameter(s):
|
||||
|
||||
Returns:
|
||||
|
||||
****************************************************************/
|
||||
round(((((_this select 0) select 0)-((_this select 1) select 0))^2 + (((_this select 0) select 1)-((_this select 1) select 1))^2)^0.5)
|
@ -1,21 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_getArg.sqf
|
||||
Author: KRONZKY
|
||||
|
||||
Description:
|
||||
|
||||
Parameter(s):
|
||||
|
||||
Returns:
|
||||
|
||||
****************************************************************/
|
||||
private["_cmd","_arg","_list","_a","_v"];
|
||||
|
||||
_cmd=_this select 0;
|
||||
_arg=_this select 1;
|
||||
_list=_this select 2;
|
||||
_a=-1;
|
||||
{_a=_a+1; _v=format["%1",_list select _a];
|
||||
if (_v==_cmd) then {_arg=(_list select _a+1)}} foreach _list;
|
||||
|
||||
_arg
|
@ -1,23 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_randomPos.sqf
|
||||
Author: KRONZKY
|
||||
|
||||
Description:
|
||||
|
||||
Parameter(s):
|
||||
|
||||
Returns:
|
||||
|
||||
****************************************************************/
|
||||
private["_a","_b","_from","_to","_return"];
|
||||
|
||||
_from = _this select 0;
|
||||
_to = _this select 1;
|
||||
_return = 0;
|
||||
|
||||
_a = ((_to select 0) - (_from select 0));
|
||||
_b = ((_to select 1) - (_from select 1));
|
||||
if (_a != 0 || _b != 0) then {_return = _a atan2 _b};
|
||||
if ( _return < 0 ) then { _return = _return + 360 };
|
||||
|
||||
_return
|
@ -1,52 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_getminesclass.sqf
|
||||
Author: Azroul13
|
||||
|
||||
Description:
|
||||
|
||||
Parameter(s):
|
||||
Nothing
|
||||
Returns:
|
||||
Array of mines types
|
||||
****************************************************************/
|
||||
|
||||
private ["_minesclassname","_minetype1","_minetype2","_cfgvehicles","_cfgvehicle","_inherit","_vehicle"];
|
||||
|
||||
_minesclassname = [];
|
||||
_minetype1 = [];
|
||||
_minetype2 = [];
|
||||
_minetype3 = [];
|
||||
|
||||
_APMines = [];
|
||||
_ATMines = [];
|
||||
_underwatermines = [];
|
||||
|
||||
|
||||
{
|
||||
_mineTriggerType = tolower gettext (_x >> "mineTriggerType");
|
||||
if (_mineTriggerType in ["radius","wire"]) then
|
||||
{
|
||||
_mineMagnetic = getnumber (_x >> "mineMagnetic");
|
||||
_array = if (_mineMagnetic > 0) then {_ATMines} else {_APMines};
|
||||
_underwatermine=[tolower configname _x,"underwater"] call UPSMON_StrInStr;
|
||||
if (_underwatermine) then {_array=_underwatermines;};
|
||||
_array set [count _array,tolower configname _x];
|
||||
};
|
||||
} foreach ((configfile >> "CfgMineTriggers") call bis_fnc_returnchildren);
|
||||
|
||||
{
|
||||
_cfgvehicle = _x;
|
||||
_inherit = inheritsFrom _cfgvehicle;
|
||||
If ((configName _inherit) == "MineBase") then
|
||||
{
|
||||
_vehicle = configName _cfgvehicle;
|
||||
_ammo = tolower gettext (_cfgvehicle >> "ammo");
|
||||
_trigger = tolower gettext (configfile >> "cfgAmmo" >> _ammo >> "mineTrigger");
|
||||
if (_trigger in _ATMines) then {_minetype1 set [count _minetype1,_vehicle];};
|
||||
if (_trigger in _APMines) then {_minetype2 set [count _minetype2,_vehicle];};
|
||||
if (_trigger in _underwatermines) then {_minetype3 set [count _minetype3,_vehicle];};
|
||||
};
|
||||
} foreach ((configfile >> "CfgVehicles") call bis_fnc_returnchildren);
|
||||
|
||||
_minesclassname = [_minetype1,_minetype2,_minetype3];
|
||||
_minesclassname
|
@ -1,71 +0,0 @@
|
||||
/*
|
||||
File: fn_findOverwatch.sqf
|
||||
Author: Dean "Rocket" Hall
|
||||
|
||||
Description:
|
||||
Function which selects a position that provides overwatch
|
||||
onto another position.
|
||||
|
||||
Parameter(s):
|
||||
_this select 0: the target position (position)
|
||||
_this select 1: maximum distance from target in meters (optional)
|
||||
_this select 2: minimum distance from target in meters (optional)
|
||||
_this select 3: minimum height in relation to target in meters (optional)
|
||||
_this select 4: position to start looking from, if different from target pos (optional)
|
||||
*/
|
||||
private ["_unit","_dir","_targetPos","_distance","_pool","_i","_flankAngle","_scan","_points","_targetPosTemp","_terrainscan","_los_ok","_final"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_dir = _this select 1;
|
||||
|
||||
_targetPos = getposATL _unit;
|
||||
|
||||
_pool = [];
|
||||
|
||||
_i = 0;
|
||||
_scan = true;
|
||||
|
||||
while {_scan} do
|
||||
{
|
||||
_i = _i + 1;
|
||||
_targetPosTemp = [_targetPos,[0,50],[_dir +70,_dir +220],0,[0,100],5] call UPSMON_pos;
|
||||
If (!surfaceIsWater _targetPosTemp) then
|
||||
{
|
||||
_points = 0;
|
||||
_targetPosTemp = [_targetPosTemp select 0,_targetPosTemp select 1,0];
|
||||
If (_unit != vehicle _unit) then
|
||||
{
|
||||
If (isOnRoad _targetPosTemp) then
|
||||
{
|
||||
_points = _points +20;
|
||||
};
|
||||
_value = [_targetPosTemp,1,1] call UPSMON_TerraCognita;
|
||||
_meadow = _value select 3;
|
||||
_terr = _meadow * 100;
|
||||
_elev = getTerrainHeightASL [_targetPosTemp select 0,_targetPosTemp select 1];
|
||||
_points = _points + _terr + _elev;
|
||||
}
|
||||
else
|
||||
{
|
||||
_value = [_targetPosTemp,1,1] call UPSMON_TerraCognita;
|
||||
_urban = _value select 0;
|
||||
_forest = _value select 1;
|
||||
_terr = (_urban + _forest) * 100;
|
||||
_elev = getTerrainHeightASL [_targetPosTemp select 0,_targetPosTemp select 1];
|
||||
_points = _points +_terr + _elev;
|
||||
};
|
||||
|
||||
_los_ok = [_targetPos,_targetPosTemp] call UPSMON_LOS;
|
||||
If (_los_ok) then {_points = _points + 200;};
|
||||
_targetpostemp pushback _points;
|
||||
_pool pushback _targetPosTemp;
|
||||
};
|
||||
If (count _pool > 10 || _i > 50) then {_scan = false};
|
||||
};
|
||||
|
||||
|
||||
_pool = [_pool, [], {_x select 3}, "DESCEND"] call BIS_fnc_sortBy;
|
||||
|
||||
If (count _pool > 0) then {_targetpos = [(_pool select 0) select 0,(_pool select 0) select 1,0];};
|
||||
|
||||
_targetPos;
|
@ -1,25 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_randomPos.sqf
|
||||
Author: KRONZKY
|
||||
|
||||
Description:
|
||||
|
||||
Parameter(s):
|
||||
|
||||
Returns:
|
||||
|
||||
****************************************************************/
|
||||
private["_cx","_cy","_rx","_ry","_cd","_sd","_ad","_tx","_ty","_xout","_yout"];
|
||||
|
||||
_cx=_this select 0;
|
||||
_cy=_this select 1;
|
||||
_rx=_this select 2;
|
||||
_ry=_this select 3;
|
||||
_cd=_this select 4;
|
||||
_sd=_this select 5;
|
||||
_ad=_this select 6;
|
||||
_tx=random (_rx*2)-_rx;
|
||||
_ty=random (_ry*2)-_ry;
|
||||
_xout=if (_ad!=0) then {_cx+ (_cd*_tx - _sd*_ty)} else {_cx+_tx};
|
||||
_yout=if (_ad!=0) then {_cy+ (_sd*_tx + _cd*_ty)} else {_cy+_ty};
|
||||
[_xout,_yout]
|
@ -1,31 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_rotpoint.sqf
|
||||
Author: KRONZKY
|
||||
|
||||
Description:
|
||||
|
||||
Parameter(s):
|
||||
|
||||
Returns:
|
||||
|
||||
****************************************************************/
|
||||
private["_cp","_a","_tx","_ty","_cd","_sd","_cx","_cy","_xout","_yout"];
|
||||
|
||||
_cp=_this select 0;
|
||||
_cx=_cp select 0;
|
||||
_cy=_cp select 1;
|
||||
_a=_this select 1;
|
||||
_cd=cos(_a*-1);
|
||||
_sd=sin(_a*-1);
|
||||
_tx=_this select 2;
|
||||
_ty=_this select 3;
|
||||
_xout=if (_a!=0) then
|
||||
{
|
||||
_cx+ (_cd*_tx - _sd*_ty)
|
||||
} else
|
||||
{
|
||||
_cx+_tx
|
||||
};
|
||||
_yout=if (_a!=0) then {_cy+ (_sd*_tx + _cd*_ty)} else {_cy+_ty};
|
||||
|
||||
[_xout,_yout,0]
|
@ -1,27 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_setArg.sqf
|
||||
Author: KRONZKY
|
||||
|
||||
Description:
|
||||
|
||||
Parameter(s):
|
||||
|
||||
Returns:
|
||||
|
||||
****************************************************************/
|
||||
private["_cmd","_arg","_list","_a","_v"];
|
||||
|
||||
_cmd=_this select 0;
|
||||
_arg=_this select 1;
|
||||
_list=_this select 2;
|
||||
_a=-1;
|
||||
{
|
||||
_a=_a+1;
|
||||
_v= format ["%1", _list select _a];
|
||||
if (_v==_cmd) then
|
||||
{
|
||||
_a=_a+1;
|
||||
_list set [_a,_arg];
|
||||
};
|
||||
} foreach _list;
|
||||
_list
|
@ -1,65 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_spawnmines.sqf
|
||||
Author: Azroul13
|
||||
|
||||
Description:
|
||||
|
||||
Parameter(s):
|
||||
|
||||
Returns:
|
||||
|
||||
****************************************************************/
|
||||
|
||||
private ["_minesnbr","_minetype1","_minetype2","_positiontoambush","_minetype","_mineposition","_max","_min","_ang","_dir","_orgX","_orgY","_posX","_posY","_mineposition","_Mine"];
|
||||
|
||||
_minesnbr = _this select 0;
|
||||
_minetype1 = _this select 1;
|
||||
_minetype2 = _this select 2;
|
||||
_positiontoambush = _this select 3;
|
||||
_diramb = _this select 4;
|
||||
_side = _this select 5;
|
||||
|
||||
for [{_i=0}, {_i < _minesnbr}, {_i=_i+1}] do
|
||||
{
|
||||
_minetype= _minetype1;
|
||||
_mineposition = _positiontoambush;
|
||||
|
||||
If (_i > 0) then
|
||||
{
|
||||
_minetype = _minetype2;
|
||||
// Many thanks Shuko ...
|
||||
_max = 0; _min = 0;
|
||||
if (floor (random 4) < 2) then
|
||||
{
|
||||
_min = _diramb + 270;
|
||||
_max = _diramb + 335;
|
||||
}
|
||||
else
|
||||
{
|
||||
_min = _diramb + 25;
|
||||
_max = _diramb + 90;
|
||||
};
|
||||
|
||||
_ang = _max - _min;
|
||||
// Min bigger than max, can happen with directions around north
|
||||
if (_ang < 0) then { _ang = _ang + 360 };
|
||||
if (_ang > 360) then { _ang = _ang - 360 };
|
||||
_dir = (_min + random _ang);
|
||||
|
||||
_orgX = _positiontoambush select 0;
|
||||
_orgY = _positiontoambush select 1;
|
||||
_posX = _orgX + (((random 10) + (random 30 +5)) * sin _dir);
|
||||
_posY = _orgY + (((random 10) + (random 30 +5)) * cos _dir);
|
||||
_mineposition = [_posX,_posY,0];
|
||||
};
|
||||
|
||||
|
||||
_Mine=createMine [_minetype,_mineposition, [], 0];
|
||||
_side revealMine _Mine;
|
||||
if (UPSMON_Debug>0) then
|
||||
{
|
||||
[_mineposition,"Sign_Arrow_Large_GREEN_F"] spawn UPSMON_createsign;
|
||||
[_mineposition,"Icon","Minefield","Colorred"] spawn UPSMON_createmarker
|
||||
};
|
||||
sleep 0.01;
|
||||
};
|
@ -1,25 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_stayInside.sqf
|
||||
Author: KRONZKY
|
||||
|
||||
Description:
|
||||
|
||||
Parameter(s):
|
||||
|
||||
Returns:
|
||||
|
||||
****************************************************************/
|
||||
private["_np","_nx","_ny","_cp","_cx","_cy","_rx","_ry","_d","_tp","_tx","_ty","_fx","_fy"];
|
||||
|
||||
_np=_this select 0; _nx=_np select 0; _ny=_np select 1;
|
||||
_cp=_this select 1; _cx=_cp select 0; _cy=_cp select 1;
|
||||
_rx=_this select 2; _ry=_this select 3; _d=_this select 4;
|
||||
_tp = [_cp,_d,(_nx-_cx),(_ny-_cy)] call UPSMON_rotpoint;
|
||||
_tx = _tp select 0; _fx=_tx;
|
||||
_ty = _tp select 1; _fy=_ty;
|
||||
if (_tx<(_cx-_rx)) then {_fx=_cx-_rx};
|
||||
if (_tx>(_cx+_rx)) then {_fx=_cx+_rx};
|
||||
if (_ty<(_cy-_ry)) then {_fy=_cy-_ry};
|
||||
if (_ty>(_cy+_ry)) then {_fy=_cy+_ry};
|
||||
if ((_fx!=_tx) || (_fy!=_ty)) then {_np = [_cp,_d*-1,(_fx-_cx),(_fy-_cy)] call UPSMON_rotpoint};
|
||||
_np;
|
@ -1,43 +0,0 @@
|
||||
|
||||
UPSMON_Getnearestplayer = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_Getnearestplayer.sqf";
|
||||
UPSMON_Nighttime = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_Nighttime.sqf";
|
||||
|
||||
UPSMON_arrayShufflePlus = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_arrayShufflePlus.sqf";
|
||||
UPSMON_getArg = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_getArg.sqf";
|
||||
UPSMON_setArg = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_setArg.sqf";
|
||||
UPSMON_distancePosSqr = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_distancePosSqr.sqf";
|
||||
|
||||
UPSMON_GetPos2D = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_GetPos2D.sqf";
|
||||
UPSMON_GetCOS = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_GetCOS.sqf";
|
||||
UPSMON_GetSIN = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_GetSIN.sqf";
|
||||
|
||||
UPSMON_Replace = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_Replace.sqf";
|
||||
UPSMON_rotpoint = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_rotpoint.sqf";
|
||||
UPSMON_StrIndex = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_StrIndex.sqf";
|
||||
UPSMON_StrInStr = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_StrInStr.sqf";
|
||||
UPSMON_StrLen = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_StrLen.sqf";
|
||||
UPSMON_StrToArray = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_StrToArray.sqf";
|
||||
|
||||
UPSMON_CanSee = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_CanSee.sqf";
|
||||
UPSMON_LOS = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_LOS.sqf";
|
||||
UPSMON_Haslos = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_Haslos.sqf";
|
||||
UPSMON_overwatch = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_overwatch.sqf";
|
||||
|
||||
UPSMON_DeleteWP = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_DeleteWP.sqf";
|
||||
UPSMON_DocreateWP = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_DocreateWP.sqf";
|
||||
UPSMON_DoaddWP = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_DoaddWP.sqf";
|
||||
UPSMON_createmarker = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_createmarker.sqf";
|
||||
UPSMON_createsign = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_createsign.sqf";
|
||||
UPSMON_TRACK = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_TRACK.sqf";
|
||||
|
||||
UPSMON_checkbackpack = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_checkbackpack.sqf";
|
||||
UPSMON_getminesclass = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_getminesclass.sqf";
|
||||
UPSMON_spawnmines = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_spawnmines.sqf";
|
||||
|
||||
UPSMON_SN_EHHIT = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_SN_EHHIT.sqf";
|
||||
UPSMON_SN_EHKILLED = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_SN_EHKILLED.sqf";
|
||||
UPSMON_SN_EHFIREDNEAR = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_SN_EHFIREDNEAR.sqf";
|
||||
UPSMON_deleteDead = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_deleteDead.sqf";
|
||||
UPSMON_Nowp = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_Nowp.sqf";
|
||||
|
||||
UPSMON_AddtoArray = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Core\fnc\UPSMON_AddtoArray.sqf";
|
@ -1,45 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_fnc_filter.sqf
|
||||
Author: Robalo
|
||||
|
||||
Description:
|
||||
Filter cover objects
|
||||
Parameter(s):
|
||||
<--- Object
|
||||
Returns:
|
||||
boolean
|
||||
****************************************************************/
|
||||
private ["_type","_z","_bbox","_dz","_dy"];
|
||||
|
||||
if (_this isKindOf "Man") exitWith {false};
|
||||
if (_this isKindOf "STATICWEAPON") exitWith {false};
|
||||
if (_this isKindOf "Bird") exitWith {false};
|
||||
if (_this isKindOf "BulletCore") exitWith {false};
|
||||
if (_this isKindOf "Grenade") exitWith {false};
|
||||
if (_this isKindOf "WeaponHolder") exitWith {false};
|
||||
if (_this isKindOf "WeaponHolderSimulated") exitWith {false};
|
||||
if (_this isKindOf "Sound") exitWith {false};
|
||||
//if (!isTouchingGround _this) exitWith {false};
|
||||
if (isBurning _this) exitWith {false};
|
||||
if (["slop", (format ["%1", _this])] call BIS_fnc_inString) exitWith {false};
|
||||
if (["fence", (format ["%1", _this])] call BIS_fnc_inString) then
|
||||
{
|
||||
If (!(_this isKindOf "Strategic")) exitwith {false};
|
||||
};
|
||||
|
||||
_type = typeOf _this;
|
||||
if (_type == "") then
|
||||
{
|
||||
if (damage _this == 1) exitWith {false};
|
||||
} else {
|
||||
//if (_type in ["#soundonvehicle","#mark","#crater","#crateronvehicle","#soundonvehicle","#particlesource","#lightpoint","#slop"]) exitWith {false};
|
||||
};
|
||||
|
||||
_z = (getPosATL _this) select 2;
|
||||
if (_z > 0.3) exitWith {false};
|
||||
_bbox = boundingBoxReal _this;
|
||||
_dz = ((_bbox select 1) select 2) - ((_bbox select 0) select 2);
|
||||
_dy = abs(((_bbox select 1) select 0) - ((_bbox select 0) select 0));//width
|
||||
if ((_dz > 0.35) && (_dy > 0.35) ) exitWith {true};
|
||||
|
||||
false
|
@ -1,89 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_fnc_find_cover.sqf
|
||||
Author: OLLEM
|
||||
|
||||
Description:
|
||||
Make a group move to cover
|
||||
Parameter(s):
|
||||
<--- Leader position
|
||||
<--- Position to watch
|
||||
<--- Radius searching
|
||||
<--- Do the unit move or spawn to the cover position ?
|
||||
<--- Array of group units
|
||||
Returns:
|
||||
Nothing
|
||||
****************************************************************/
|
||||
|
||||
private ["_unitpos","_lookpos","_dist","_spawn","_units","_i","_objects","_vdir","_cpos","_object","_coverPosition"];
|
||||
|
||||
_unitpos = _this select 0;
|
||||
_lookpos = _this select 1;
|
||||
_dist = _this select 2;
|
||||
_spawn = _this select 3;
|
||||
_units = _this select 4;
|
||||
|
||||
_i = 0;
|
||||
If (count _this > 5) then {_i = _this select 5;};
|
||||
|
||||
If (_i > 3) exitwith {_units};
|
||||
|
||||
if (_spawn) then
|
||||
{
|
||||
{
|
||||
_pos2 = _unitpos findEmptyPosition [1,25];
|
||||
_x setposATL _pos2;
|
||||
}foreach _units;
|
||||
};
|
||||
|
||||
_movetocover = [];
|
||||
|
||||
(group (_units select 0)) setvariable ["UPSMON_Cover",true];
|
||||
if (UPSMON_Debug>0) then {player sidechat "Cover"};
|
||||
//potential cover objects list
|
||||
_objects = [(nearestObjects [_unitpos, [], _dist]), { _x call UPSMON_fnc_filter } ] call BIS_fnc_conditionalSelect;
|
||||
|
||||
_vdir = [_unitpos, _lookpos] call BIS_fnc_DirTo;
|
||||
|
||||
{
|
||||
If (alive _x) then
|
||||
{
|
||||
If (count _objects > 0) then
|
||||
{
|
||||
_object = _objects select 0;
|
||||
_objects = _objects - [_object];
|
||||
If (!IsNull _object) then
|
||||
{
|
||||
//_x is potential cover object
|
||||
_cPos = (getPosATL _object);
|
||||
|
||||
//set coverposition to 1.3 m behind the found cover
|
||||
_coverPosition = [(_cPos select 0) - (sin(_vdir)*1.5), (_cPos select 1) - (cos(_vdir)*1.5), 0];
|
||||
|
||||
//Any object which is high and wide enough is potential cover position, excluding water
|
||||
if (!(surfaceIsWater _coverPosition)) exitwith
|
||||
{
|
||||
|
||||
if (UPSMON_Debug>0) then
|
||||
{
|
||||
_ballCover = "sign_sphere100cm_F" createvehicle _coverPosition;
|
||||
_ballCover setpos _coverPosition;
|
||||
diag_log format ["object: %1",_object];
|
||||
};
|
||||
|
||||
_movetocover pushback _x;
|
||||
[_x,[_object, _coverPosition],_lookpos,_spawn] spawn UPSMON_fnc_move_to_cover;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
} foreach _units;
|
||||
|
||||
_units = _units - _movetocover;
|
||||
|
||||
If (count _units > 0) then
|
||||
{
|
||||
_i = _i + 1;
|
||||
_units = [_unitpos,_lookpos,_dist,_spawn,_units] call UPSMON_fnc_find_cover;
|
||||
};
|
||||
|
||||
_units;
|
@ -1,88 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_fnc_move_to_cover.sqf
|
||||
Author: OLLEM
|
||||
|
||||
Description:
|
||||
Make a group move to cover
|
||||
Parameter(s):
|
||||
<--- unit
|
||||
<--- Cover Array
|
||||
<--- Cover object
|
||||
<--- Cover position
|
||||
<--- Position to watch
|
||||
<--- Do the unit move or spawn to the cover position ?
|
||||
Returns:
|
||||
Nothing
|
||||
****************************************************************/
|
||||
|
||||
private ["_unit","_coverArray","_lookpos","_spawn","_cover","_coverPosition","_coverDist","_stopped","_continue","_checkTime","_dist","_sight"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_coverArray = _this select 1;
|
||||
_lookpos = _this select 2;
|
||||
_spawn = _this select 3;
|
||||
|
||||
_cover = _coverArray select 0;
|
||||
_coverPosition = _coverArray select 1;
|
||||
|
||||
if (_spawn) then
|
||||
{
|
||||
_unit setposATL _coverPosition;
|
||||
doStop _unit;
|
||||
|
||||
if (_unit == leader (group _unit) || random 100 < 50) then
|
||||
{
|
||||
[_unit,_lookpos] call UPSMON_dowatch;
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
Dostop _unit;
|
||||
_unit domove _coverPosition;
|
||||
_unit forceSpeed 100;
|
||||
_unit setDestination [_coverPosition, "LEADER PLANNED", true];
|
||||
|
||||
_coverDist = round ([getposATL _unit,_coverPosition] call UPSMON_distancePosSqr);
|
||||
|
||||
_stopped = true;
|
||||
_continue = true;
|
||||
|
||||
_checkTime = (time + (1.7 * _coverDist) + 20);
|
||||
|
||||
while { _continue } do
|
||||
{
|
||||
|
||||
_dist = ([getposATL _unit,_coverPosition] call UPSMON_distancePosSqr);
|
||||
|
||||
if (!(unitReady _unit) && (alive _unit) && (_dist > 1.25) && (_unit getvariable ["UPSMON_SUPSTATUS",""] == "")) then
|
||||
{
|
||||
//if unit takes too long to reach cover or moves too far out stop at current location
|
||||
if (time <= _checkTime) then
|
||||
{
|
||||
_continue = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//_coverPosition = getPosATL _unit;
|
||||
//_unit doMove _coverPosition;
|
||||
|
||||
//_continue = true;
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
_continue = false;
|
||||
_stopped = false;
|
||||
};
|
||||
};
|
||||
|
||||
_unit forcespeed -1;
|
||||
if (!( _stopped)) then
|
||||
{
|
||||
doStop _unit;
|
||||
_unit setBehaviour "STEALTH";
|
||||
_sight = [_unit,getdir _unit, 50] call UPSMON_CanSee;
|
||||
If (!_sight) then {_unit setUnitPos "MIDDLE";};
|
||||
};
|
||||
};
|
||||
|
@ -1,5 +0,0 @@
|
||||
|
||||
UPSMON_fnc_move_to_cover = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Cover\fnc\UPSMON_fnc_move_to_cover.sqf";
|
||||
|
||||
UPSMON_fnc_find_cover = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Cover\fnc\UPSMON_fnc_find_cover.sqf";
|
||||
UPSMON_fnc_filter = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Cover\fnc\UPSMON_fnc_filter.sqf";
|
@ -1,20 +0,0 @@
|
||||
|
||||
UPSMON_getleader = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Group\fnc\UPSMON_getleader.sqf";
|
||||
UPSMON_SetLeaderGrp = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Group\fnc\UPSMON_SetLeaderGrp.sqf";
|
||||
UPSMON_getunits = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Group\fnc\UPSMON_getunits.sqf";
|
||||
UPSMON_getNearestSoldier = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Group\fnc\UPSMON_getNearestSoldier.sqf";
|
||||
|
||||
UPSMON_grptype = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Group\fnc\UPSMON_grptype.sqf";
|
||||
UPSMON_GetStaticTeam = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Group\fnc\UPSMON_GetStaticTeam.sqf";
|
||||
UPSMON_composeteam = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Group\fnc\UPSMON_composeteam.sqf";
|
||||
UPSMON_analysegrp = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Group\fnc\UPSMON_analysegrp.sqf";
|
||||
UPSMON_supstatestatus = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Group\fnc\UPSMON_supstatestatus.sqf";
|
||||
UPSMON_checkmunition = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Group\fnc\UPSMON_checkmunition.sqf";
|
||||
|
||||
UPSMON_Isgrpstuck = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Group\fnc\UPSMON_Isgrpstuck.sqf";
|
||||
UPSMON_IsRetreating = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Group\fnc\UPSMON_IsRetreating.sqf";
|
||||
UPSMON_IsSurrending = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Group\fnc\UPSMON_IsSurrending.sqf";
|
||||
UPSMON_Cangrpmaneuver = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Group\fnc\UPSMON_Cangrpmaneuver.sqf";
|
||||
UPSMON_Supressfire = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Group\fnc\UPSMON_Supressfire.sqf";
|
||||
|
||||
UPSMON_ChangeFormation = compile preProcessFileLineNumbers "Scripts\UPSMON\COMMON\Group\fnc\UPSMON_ChangeFormation.sqf";
|
@ -1,34 +0,0 @@
|
||||
|
||||
private ["_grp","_nowp","_attackpos","_typeofgrp","_maneuver"];
|
||||
|
||||
_grp = _this select 0;
|
||||
_nowp = _this select 1;
|
||||
_attackpos = _this select 2;
|
||||
_typeofgrp = _this select 3;
|
||||
|
||||
_maneuver = false;
|
||||
|
||||
If (!_nowp) then
|
||||
{
|
||||
If (count _attackpos > 0) then
|
||||
{
|
||||
If (!("static" in _typeofgrp)) then
|
||||
{
|
||||
If (!("arti" in _typeofgrp)) then
|
||||
{
|
||||
If (!("supply" in _typeofgrp)) then
|
||||
{
|
||||
If (_grp getvariable ["UPSMON_TIMEORDER",time] <= time) then
|
||||
{
|
||||
If (_grp getvariable ["UPSMON_Grpmission",""] != "TRANSPORT") then
|
||||
{
|
||||
_maneuver = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_maneuver;
|
@ -1,171 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_SetStances.sqf
|
||||
Author: Azroul13
|
||||
|
||||
Description:
|
||||
|
||||
Parameter(s):
|
||||
|
||||
Returns:
|
||||
|
||||
****************************************************************/
|
||||
|
||||
private ["_grp","_supstatus","_attackpos","_dist","_terrainscan","_haslos","_time"];
|
||||
|
||||
_grp = _this select 0;
|
||||
_supstatus = _this select 1;
|
||||
_attackpos = _this select 2;
|
||||
_dist = _this select 3;
|
||||
_terrainscan = _this select 4;
|
||||
_haslos = _this select 5;
|
||||
_typeofgrp = _this select 6;
|
||||
|
||||
If (!(_grp getvariable ["UPSMON_haschangedformation",false])) then
|
||||
{
|
||||
_grp setvariable ["UPSMON_haschangedformation",true];
|
||||
If ("air" in _typeofgrp) then
|
||||
{
|
||||
If ((Speedmode _grp) != "FULL") then
|
||||
{
|
||||
_grp setspeedmode "FULL";
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
If (_supstatus != "SUPRESSED") then
|
||||
{
|
||||
If (count _attackpos > 0) then
|
||||
{
|
||||
If (_dist > 500 || !_haslos) then
|
||||
{
|
||||
If (vehicle (leader _grp) == (leader _grp)) then
|
||||
{
|
||||
If ((Speedmode _grp) != "NORMAL") then
|
||||
{
|
||||
_grp setspeedmode "NORMAL";
|
||||
};
|
||||
If (_dist < 200) then
|
||||
{
|
||||
If ((Formation _grp) != "LINE") then
|
||||
{
|
||||
_grp setformation "LINE";
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
If ((Formation _grp) != "STAG COLUMN") then
|
||||
{
|
||||
_grp setformation "STAG COLUMN";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
If (_dist > 150) then
|
||||
{
|
||||
If (!(Behaviour (leader _grp) in ["COMBAT","STEALTH"])) then
|
||||
{
|
||||
_grp setBehaviour "COMBAT";
|
||||
};
|
||||
|
||||
If ((Formation _grp) != "WEDGE") then
|
||||
{
|
||||
_grp setformation "WEDGE";
|
||||
};
|
||||
};
|
||||
|
||||
If (_dist <= 150) then
|
||||
{
|
||||
If ((_terrainscan select 0) == "forest" || (_terrainscan select 0) == "inhabited") then
|
||||
{
|
||||
If ((Speedmode _grp) != "LIMITED") then
|
||||
{
|
||||
_grp setspeedmode "LIMITED";
|
||||
};
|
||||
|
||||
if ((_terrainscan select 0) == "inhabited") then
|
||||
{
|
||||
If ((_terrainscan select 1) > 230) then
|
||||
{
|
||||
If ((Formation _grp) != "STAG COLUMN") then
|
||||
{
|
||||
_grp setformation "STAG COLUMN";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
If ((_terrainscan select 0) == "meadow") then
|
||||
{
|
||||
If ((Speedmode _grp) != "FULL") then
|
||||
{
|
||||
_grp setspeedmode "FULL";
|
||||
};
|
||||
If ((Formation _grp) != "LINE") then
|
||||
{
|
||||
_grp setformation "LINE";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
If (_supstatus != "") then
|
||||
{
|
||||
If ((behaviour (leader _grp)) != "COMBAT") then
|
||||
{
|
||||
(leader _grp) setbehaviour "COMBAT";
|
||||
};
|
||||
|
||||
If ((_terrainscan select 0) == "meadow") then
|
||||
{
|
||||
If (Speedmode _grp != "NORMAL") then
|
||||
{
|
||||
_grp setspeedmode "NORMAL";
|
||||
};
|
||||
};
|
||||
|
||||
If ((_terrainscan select 0) == "forest" || (_terrainscan select 0) == "inhabited") then
|
||||
{
|
||||
If ((Speedmode _grp) != "LIMITED") then
|
||||
{
|
||||
_grp setspeedmode "LIMITED";
|
||||
};
|
||||
|
||||
If ((Formation _grp) != "DIAMOND") then
|
||||
{
|
||||
_grp setformation "DIAMOND";
|
||||
};
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
If ((Speedmode _grp) != "LIMITED") then
|
||||
{
|
||||
_grp setSpeedmode "LIMITED";
|
||||
};
|
||||
|
||||
If ((Behaviour (leader _grp)) != "STEALTH") then
|
||||
{
|
||||
_grp setBehaviour "STEALTH";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
[_grp] spawn
|
||||
{
|
||||
private ["_grp"];
|
||||
|
||||
_grp = _this select 0;
|
||||
|
||||
sleep 20;
|
||||
If (!IsNull _grp) then
|
||||
{
|
||||
_grp setvariable ["UPSMON_haschangedformation",false];
|
||||
};
|
||||
};
|
@ -1,54 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_GetStaticTeam.sqf
|
||||
Author: Azroul13
|
||||
|
||||
Description:
|
||||
Check if group has weapon in bag (gun barrel and tripod)
|
||||
Parameter(s):
|
||||
<--- group
|
||||
Returns:
|
||||
---> Static Team [Gunner,Assistant]
|
||||
---> Class of the static
|
||||
****************************************************************/
|
||||
|
||||
private ["_grp","_position","_targetpos","_result","_staticTeam","_vehicle","_tripods","_unit","_backpack","_lots"];
|
||||
|
||||
_grp = _this select 0;
|
||||
|
||||
_result = [];
|
||||
_staticTeam = [];
|
||||
_vehicle = [];
|
||||
_tripods = [];
|
||||
|
||||
{
|
||||
if (alive _x) then
|
||||
{
|
||||
_unit = _x;
|
||||
_backpack = backpack _Unit;
|
||||
If (_backpack != "") then
|
||||
{
|
||||
_lots = [_backpack] call UPSMON_checkbackpack;
|
||||
if (count _lots > 0) exitwith {_vehicle = _lots select 0; _tripods = _lots select 1; _staticTeam pushback _x;};
|
||||
};
|
||||
};
|
||||
} foreach units _grp;
|
||||
|
||||
if (count _staticTeam > 0) then
|
||||
{
|
||||
|
||||
{
|
||||
if (alive _x) then
|
||||
{
|
||||
_unit = _x;
|
||||
_backpack = backpack _Unit;
|
||||
If (_backpack != "") then
|
||||
{
|
||||
if (_backpack in _tripods) exitwith {_staticTeam pushback _x;};
|
||||
};
|
||||
};
|
||||
|
||||
} foreach units _grp;
|
||||
};
|
||||
|
||||
_result = [_staticTeam,_vehicle];
|
||||
_result
|
@ -1,35 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_GothitParam.sqf
|
||||
Author: Azroul13
|
||||
|
||||
Description:
|
||||
Is the unit hit ? Or Does it under fire ?
|
||||
|
||||
Parameter(s):
|
||||
<--- unit
|
||||
Returns:
|
||||
Boolean
|
||||
****************************************************************/
|
||||
|
||||
private ["_npc","_gothit"];
|
||||
|
||||
_npc = _this select 0;
|
||||
_gothit = false;
|
||||
|
||||
If (isNil "tpwcas_running") then
|
||||
{
|
||||
if (group _npc in UPSMON_GOTHIT_ARRAY || group _npc in UPSMON_GOTKILL_ARRAY) then
|
||||
{
|
||||
_gothit = true;
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
_Supstate = [_npc] call UPSMON_supstatestatus;
|
||||
if (group _npc in UPSMON_GOTHIT_ARRAY || group _npc in UPSMON_GOTKILL_ARRAY || _Supstate >= 2) then
|
||||
{
|
||||
_gothit = true;
|
||||
};
|
||||
};
|
||||
|
||||
_gothit
|
@ -1,37 +0,0 @@
|
||||
|
||||
private ["_grp","_dist","_ratio","_supstatus","_unitsneedammo","_typeofgrp","_assignedvehicles","_attackpos"];
|
||||
|
||||
_grp = _this select 0;
|
||||
_dist = _this select 1;
|
||||
_ratio = _this select 2;
|
||||
_supstatus = _this select 3;
|
||||
_unitsneedammo = _this select 4;
|
||||
_typeofgrp = _this select 5;
|
||||
_attackpos = _this select 6;
|
||||
_assignedvehicles = _this select 7;
|
||||
|
||||
|
||||
If (_grp getvariable ["UPSMON_Grpmission",""] != "RETREAT") then
|
||||
{
|
||||
If (!("static" in _typeofgrp)) then
|
||||
{
|
||||
If (_ratio > 2 || (count units _grp) == count _unitsneedammo || (_supstatus != "INCAPACITED") || ("arti" in _typeofgrp) || ("support" in _typeofgrp)) then
|
||||
{
|
||||
If (_dist >= 300) then
|
||||
{
|
||||
If (_supstatus != "SUPRESSED") then
|
||||
{
|
||||
If (!(fleeing (leader _grp))) then
|
||||
{
|
||||
If ((random 100) <= (call (compile format ["UPSMON_%1_RETREAT",(_grp getvariable ["UPSMON_Origin",[]]) select 5]))) then
|
||||
{
|
||||
[_grp,_attackpos,_typeofgrp,_assignedvehicles] spawn UPSMON_DORETREAT;
|
||||
_grp setvariable ["UPSMON_Grpmission","RETREAT"];
|
||||
_grpstatus = "BLUE";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
@ -1,38 +0,0 @@
|
||||
|
||||
private ["_grp","_dist","_ratio","_supstatus","_unitsneedammo","_typeofgrp","_haslos"];
|
||||
|
||||
_grp = _this select 0;
|
||||
_dist = _this select 1;
|
||||
_ratio = _this select 2;
|
||||
_supstatus = _this select 3;
|
||||
_unitsneedammo = _this select 4;
|
||||
_typeofgrp = _this select 5;
|
||||
_haslos = _this select 6;
|
||||
|
||||
|
||||
If (_grp getvariable ["UPSMON_Grpmission",""] != "RETREAT") then
|
||||
{
|
||||
If (UPSMON_SURRENDER) then
|
||||
{
|
||||
If ((random 100) <= (call (compile format ["UPSMON_%1_SURRENDER",(_grp getvariable ["UPSMON_Origin",[]]) select 5]))) then
|
||||
{
|
||||
If (!("air" in _typeofgrp)) then
|
||||
{
|
||||
If (_ratio > 2 || ((count units _grp) == count _unitsneedammo) || (_supstatus != "")) then
|
||||
{
|
||||
If (_supstatus == "SUPRESSED") then
|
||||
{
|
||||
If (_dist < 300) then
|
||||
{
|
||||
If (_haslos) then
|
||||
{
|
||||
_grp setvariable ["UPSMON_Grpmission","SURRENDER"];
|
||||
_grpstatus = "BLUE";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
@ -1,73 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_Isgrpstuck.sqf
|
||||
Author: Azroul13
|
||||
|
||||
Description:
|
||||
Check if the group is stuck
|
||||
Parameter(s):
|
||||
|
||||
Returns:
|
||||
boolean
|
||||
****************************************************************/
|
||||
|
||||
private ["_npc","_lastcurrpos","_currpos","_grp","_stuck","_rstuckControl"];
|
||||
|
||||
_npc = _this select 0;
|
||||
_lastcurrpos = _this select 1;
|
||||
_currpos = _this select 2;
|
||||
_grp = group _npc;
|
||||
_stuck = false;
|
||||
|
||||
//Stuck control
|
||||
If (alive _npc) then
|
||||
{
|
||||
If (canmove _npc) then
|
||||
{
|
||||
If (!((vehicle _npc) iskindof "air")) then
|
||||
{
|
||||
If (_grp getvariable ["UPSMON_NOWP",0] == 0) then
|
||||
{
|
||||
If (_lastcurrpos select 0 == _currpos select 0 && _lastcurrpos select 1 == _currpos select 1) then
|
||||
{
|
||||
//time > _grp getvariable ["UPSMON_TIMEONTARGET",time]
|
||||
If (_grp getvariable ["UPSMON_Grpmission",""] != "DEFEND") then
|
||||
{
|
||||
If (_grp getvariable ["UPSMON_Grpmission",""] != "FORTIFY") then
|
||||
{
|
||||
If (_grp getvariable ["UPSMON_Grpmission",""] != "AMBUSH") then
|
||||
{
|
||||
If (!(_npc getvariable ["UPSMON_searchingpos",false])) then
|
||||
{
|
||||
If (!(_grp getVariable ["UPSMON_movetolanding",false])) then
|
||||
{
|
||||
If (!(_grp getvariable ["UPSMON_embarking",false])) then
|
||||
{
|
||||
If (!((vehicle _npc) getvariable ["UPSMON_disembarking",false])) then
|
||||
{
|
||||
_rstuckControl = (_grp getvariable ["UPSMON_RSTUCKCONTROL",0]) + 1;
|
||||
_grp setvariable ["UPSMON_RSTUCKCONTROL",_rstuckControl];
|
||||
|
||||
If (_rstuckControl >= 10) then
|
||||
{
|
||||
//[_npc] call UPSMON_cancelstop;
|
||||
//{if (alive _x && leader _x != _x) then {_x dofollow (leader _x)};} foreach units _grp;
|
||||
_grp setvariable ["UPSMON_RSTUCKCONTROL",0];
|
||||
_stuck = true;
|
||||
|
||||
if (UPSMON_Debug>0) then {player sidechat format["%1 stucked, moving",_grp getvariable ["UPSMON_Grpid",0]]};
|
||||
if (UPSMON_Debug>0) then {diag_log format["%1 stuck for %2 seconds - trying to move again",_grp getvariable ["UPSMON_Grpid",0]]};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_stuck
|
@ -1,39 +0,0 @@
|
||||
/****************************************************************
|
||||
File: UPSMON_SetLeaderGrp.sqf
|
||||
Author: Azroul13
|
||||
|
||||
Description:
|
||||
Set the leader of the group
|
||||
Parameter(s):
|
||||
<--- Unit or Group
|
||||
Returns:
|
||||
---> Leader
|
||||
****************************************************************/
|
||||
|
||||
private ["_unit","_Leader", "_grp"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_grp = group _unit;
|
||||
_Leader = leader (_grp);
|
||||
|
||||
if ((_unit iskindof "Man")) then {
|
||||
|
||||
if(_unit != _Leader) then {
|
||||
_grp selectLeader _unit;
|
||||
};
|
||||
|
||||
} else {
|
||||
|
||||
if (!isnull(commander _unit) ) then {
|
||||
_unit = commander _unit;
|
||||
}else{
|
||||
if (!isnull(driver _unit) ) then {
|
||||
_unit = driver _unit;
|
||||
}else{
|
||||
_unit = gunner _unit;
|
||||
};
|
||||
};
|
||||
_grp selectLeader _unit;
|
||||
};
|
||||
|
||||
_Leader
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user