Tried to make heli patrols more aggresive; some bug fixes; one or two mor of those to come.
To Do: debug the situation in which loot crate loading is delayed till mission is triggered where multiple loot containers are provided. Debug the cleanup that does autoreload for mounted weapons on vehicles.
This commit is contained in:
@ -37,10 +37,11 @@ _newPos = (_group getVariable ["patrolCenter",_wpPos]) getPos[_dis,_arc];
|
||||
_group setCurrentWaypoint _wp;
|
||||
_wp setWaypointType "MOVE";
|
||||
_wp setWaypointName "move";
|
||||
//_wp setWaypointBehaviour "COMBAT";
|
||||
//_wp setWaypointCombatMode "RED";
|
||||
_wp setWaypointBehaviour blck_groupBehavior;
|
||||
_wp setWaypointCombatMode blck_combatMode;
|
||||
_wp setWaypointTimeout [1,1.1,1.2];
|
||||
_wp setWaypointStatements ["true","this call blck_fnc_changeToSADWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a SAD Waypoint',group this];"];
|
||||
//_wp setWaypointStatements ["true","this call blck_fnc_changeToSADWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a SAD Waypoint',group this];"];
|
||||
_wp setWaypointStatements ["true","this call blck_fnc_changeToSentryWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a SAD Waypoint',group this];"];
|
||||
_wp setWaypointPosition _newPos;
|
||||
|
||||
|
||||
|
@ -25,8 +25,8 @@ _wp = [_group, 0];
|
||||
_group setCurrentWaypoint _wp;
|
||||
_wp setWaypointType "SAD";
|
||||
_wp setWaypointName "sad";
|
||||
//_wp setWaypointBehaviour "COMBAT";
|
||||
//_wp setWaypointCombatMode "RED";
|
||||
_wp setWaypointBehaviour blck_groupBehavior;
|
||||
_wp setWaypointCombatMode blck_combatMode;
|
||||
_wp setWaypointTimeout [60,75,90];
|
||||
_wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a Move Waypoint',group this];"];
|
||||
|
||||
|
@ -0,0 +1,33 @@
|
||||
// Sets the WP type for WP for the specified group and updates other atributes accordingly.
|
||||
/*
|
||||
for DBD Clan
|
||||
By Ghostrider-DBD-
|
||||
Copyright 2016
|
||||
Last modified 3/14/17
|
||||
|
||||
--------------------------
|
||||
License
|
||||
--------------------------
|
||||
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
|
||||
|
||||
http://creativecommons.org/licenses/by-nc-sa/4.0/
|
||||
*/
|
||||
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
|
||||
|
||||
private["_group","_wp"];
|
||||
|
||||
//diag_log format["_fnc_changeToSADWaypoint:: -- :: _this = %1 and typName _this %2",_this, typeName _this];
|
||||
_group = group _this;
|
||||
//diag_log format["_fnc_changeToSADWaypoint:: -- >> group to update is %1 with typeName %2",_group, typeName _group];
|
||||
|
||||
_group setVariable["timeStamp",diag_tickTime];
|
||||
_wp = [_group, 0];
|
||||
_group setCurrentWaypoint _wp;
|
||||
_wp setWaypointType "SAD";
|
||||
_wp setWaypointName "sad";
|
||||
//_wp setWaypointBehaviour "COMBAT";
|
||||
//_wp setWaypointCombatMode "RED";
|
||||
_wp setWaypointTimeout [60,75,90];
|
||||
_wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a Move Waypoint',group this];"];
|
||||
|
||||
|
@ -37,7 +37,11 @@ if (_index >= (count _pattern)) then
|
||||
|
||||
_group setVariable["wpIndex",_index];
|
||||
_type = _pattern select _index;
|
||||
|
||||
#ifdef blck_debugMode
|
||||
diag_log format["_fnc_setNextWaypoint: -> waypoint for group %1 to be updated to mode %2 at position %3 with index %4",_group,_type,waypointPosition _wp, _index];
|
||||
#endif
|
||||
|
||||
// revisit this to account for dead units. use waypointPosition if possible.
|
||||
_wpPos = waypointPosition _wp;
|
||||
|
||||
@ -55,19 +59,30 @@ if (true /*_type isEqualTo toLower "move"*/) then
|
||||
_oldPos = waypointPosition _wp;
|
||||
_newPos = (_group getVariable ["patrolCenter",_wpPos]) getPos[_dis,_arc];
|
||||
_wp setWPPos _newPos;
|
||||
|
||||
#ifdef blck_debugMode
|
||||
diag_log format["_fnc_setNextWaypoint: -- > for group %5 | _dis = %1 | _arc = %2 _oldPos = %3 | _newPos = %4",_dis,_arc,_oldPos,_newPos,_group];
|
||||
#endif
|
||||
|
||||
//_wp setWaypointTimeout [1.0,1.1,1.2];
|
||||
_wp setWaypointTimeout [20,25,30];
|
||||
} else {
|
||||
_wp setWaypointTimeout [20,25,30];
|
||||
_newPos = _wpPos;
|
||||
_wp setWPPos _newPos;
|
||||
|
||||
#ifdef blck_debugMode
|
||||
diag_log format["_fnc_setNextWaypoint: - waypoint position for group %1 not changed",_group];
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef blck_debugMode
|
||||
diag_log format["_fnc_setNextWaypoint: -> waypoint for group %1 set to mode %2 at position %3 with index %4",_group,_type,waypointPosition _wp, _index];
|
||||
diag_log format["_fnc_setNextWaypoint:-> waypoint statements for group %1 = %2",_group, waypointStatements [_group,_index]];
|
||||
//_wp setWaypointBehaviour "COMBAT";
|
||||
//_wp setWaypointCombatMode "RED";
|
||||
#endif
|
||||
|
||||
_wp setWaypointBehaviour blck_groupBehavior;
|
||||
_wp setWaypointCombatMode blck_combatMode;
|
||||
_group setCurrentWaypoint _wp;
|
||||
|
||||
|
||||
|
@ -53,9 +53,8 @@ _wp setWaypointTimeout [20,25,30];
|
||||
_wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint;diag_log format['====Updating waypoint to Move for group %1',group this];"];
|
||||
#endif
|
||||
|
||||
_wp setWaypointBehaviour "COMBAT";
|
||||
_wp setWaypointCombatMode "RED";
|
||||
//_wp setWaypointTimeout [1,1.1,1.2];
|
||||
_wp setWaypointBehaviour blck_groupBehavior;
|
||||
_wp setWaypointCombatMode blck_combatMode;
|
||||
_group setCurrentWaypoint _wp;
|
||||
|
||||
/*
|
||||
|
@ -43,7 +43,7 @@ if !(isNull _groupSpawned) then
|
||||
_groupSpawned allowfleeing 0;
|
||||
_groupSpawned setspeedmode "FULL";
|
||||
_groupSpawned setFormation blck_groupFormation;
|
||||
_groupSpawned setVariable ["blck_group",true,true];
|
||||
_groupSpawned setVariable ["blck_group",true];
|
||||
|
||||
//diag_log format["spawnGroup:: group is %1",_groupSpawned];
|
||||
// Determines whether or not the group has launchers
|
||||
|
@ -64,7 +64,7 @@
|
||||
};
|
||||
[_mines] spawn blck_fnc_clearMines;
|
||||
//diag_log format["_fnc_endMission: (23) _objects = %1",_objects];
|
||||
[_objects, (_cleanupCompositionTimer)] spawn blck_fnc_addObjToQue;
|
||||
[_objects, _cleanupCompositionTimer] spawn blck_fnc_addObjToQue;
|
||||
//diag_log format["_fnc_endMission:: (26) _blck_AllMissionAI = %1",_blck_AllMissionAI];
|
||||
[_blck_AllMissionAI, (_cleanupAliveAITimer)] spawn blck_fnc_addLiveAItoQue;
|
||||
[_blck_localMissionMarker select 0] execVM "debug\deleteMarker.sqf";
|
||||
|
@ -2,7 +2,7 @@
|
||||
By Ghostrider-DbD-
|
||||
Last Modified 3-12-17
|
||||
*/
|
||||
private ["_unit","_instigator"];
|
||||
private ["_unit","_instigator","_group","_wp"];
|
||||
//diag_log format["_EH_AIHit::-->> _this = %1",_this];
|
||||
_unit = _this select 0 select 0;
|
||||
_instigator = _this select 0 select 3;
|
||||
@ -10,6 +10,13 @@ diag_log format["EH_AIHit:: _units = %1 and _instigator = %2 units damage is %3"
|
||||
if (!(alive _unit)) exitWith {};
|
||||
if (!(isPlayer _instigator)) exitWith {};
|
||||
[_unit,_instigator] call blck_fnc_alertNearbyLeader;
|
||||
_group = group _unit;
|
||||
//_group setBehavior "COMBAT";
|
||||
_wp = [_group, currentWaypoint _group];
|
||||
_wp setWaypointBehaviour "COMBAT";
|
||||
_group setCombatMode "RED";
|
||||
_wp setWaypointCombatMode "RED";
|
||||
|
||||
if (_unit getVariable ["hasHealed",false]) exitWith {};
|
||||
if ((damage _unit) > 0.1 ) then
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Handle AI Deaths
|
||||
Last Modified 1/13/17
|
||||
Last Modified 3/23/17
|
||||
By Ghostrider-DBD-
|
||||
Copyright 2016
|
||||
*/
|
||||
@ -9,7 +9,12 @@ private["_group","_isLegal","_weapon","_lastkill","_kills","_message","_killstre
|
||||
params["_unit","_killer","_isLegal"];
|
||||
|
||||
_unit setVariable ["blck_cleanupAt", (diag_tickTime) + blck_bodyCleanUpTimer, true];
|
||||
|
||||
if (vehicle _unit != _unit) then {
|
||||
if (count crew (vehicle _unit) isEqualTo 0) then
|
||||
{
|
||||
[vehicle _unit] call blck_fnc_releaseVehicleToPlayers;
|
||||
};
|
||||
};
|
||||
blck_deadAI pushback _unit;
|
||||
_group = group _unit;
|
||||
[_unit] joinSilent grpNull;
|
||||
@ -17,7 +22,15 @@ if (count(units _group) < 1) then {deleteGroup _group;};
|
||||
if (blck_launcherCleanup) then {[_unit] spawn blck_fnc_removeLaunchers;};
|
||||
if (blck_removeNVG) then {[_unit] spawn blck_fnc_removeNVG;};
|
||||
if !(isPlayer _killer) exitWith {};
|
||||
[_unit,_killer] call blck_fnc_alertNearbyUnits;
|
||||
//[_unit,_killer] call blck_fnc_alertNearbyUnits;
|
||||
[_unit,_killer] call blck_fnc_alertNearbyLeader;
|
||||
_group = group _unit;
|
||||
//_group setBehavior "COMBAT";
|
||||
_wp = [_group, currentWaypoint _group];
|
||||
_wp setWaypointBehaviour "COMBAT";
|
||||
_group setCombatMode "RED";
|
||||
_wp setWaypointCombatMode "RED";
|
||||
|
||||
_isLegal = [_unit,_killer] call blck_fnc_processIlleagalAIKills;
|
||||
|
||||
if !(_isLegal) exitWith {};
|
||||
|
@ -45,7 +45,7 @@ _fn_deleteAIGear = {
|
||||
|
||||
_fn_msgIED = {
|
||||
params["_killer"];
|
||||
diag_log format["fn_msgIED:: -- >> msg = %1 and owner _killer = %2",blck_Message, (owner _killer)];
|
||||
//diag_log format["fn_msgIED:: -- >> msg = %1 and owner _killer = %2",blck_Message, (owner _killer)];
|
||||
[["IED","",0,0],[_killer]] call blck_fnc_MessagePlayers;
|
||||
};
|
||||
|
||||
|
@ -56,10 +56,17 @@ if (isNull _grpParatroops) then
|
||||
};
|
||||
if !(isNull _grpPilot) then
|
||||
{
|
||||
_grpPilot setBehaviour "CARELESS";
|
||||
_grpPilot setBehaviour "COMBAT";
|
||||
_grpPilot setCombatMode "RED";
|
||||
_grpPilot setSpeedMode "FULL";
|
||||
_grpPilot setSpeedMode "NORMAL";
|
||||
_grpPilot allowFleeing 0;
|
||||
_grpPilot setVariable["patrolCenter",_coords];
|
||||
_grpPilot setVariable["minDis",15];
|
||||
_grpPilot setVariable["maxDis",30];
|
||||
_grpPilot setVariable["timeStamp",diag_tickTime];
|
||||
_grpPilot setVariable["arc",0];
|
||||
_grpPilot setVariable["wpRadius",30];
|
||||
_grpPilot setVariable["wpMode","SAD"];
|
||||
|
||||
private["_supplyHeli"];
|
||||
//create helicopter and spawn it
|
||||
@ -158,16 +165,16 @@ if !(isNull _grpPilot) then
|
||||
[_coords,_skillAI,_weapons,_uniforms,_headGear,_grpParatroops,_patrolHeli] call blck_fnc_spawnMissionParatroops;
|
||||
};
|
||||
//set waypoint for helicopter
|
||||
// params["_pos","_minDis","_maxDis","_group",["_mode","random"],["_pattern",["MOVE","SAD"]]];
|
||||
// params["_pos","_minDis","_maxDis","_grpPilot",["_mode","random"],["_pattern",["MOVE","SAD"]]];
|
||||
//[_coords,2,10,_grpPilot,"random",["MOVE","SENTRY"]] call blck_fnc_setupWaypoints;
|
||||
private["_wpDestination"];
|
||||
|
||||
[_grpPilot, 0] setWPPos _coords;
|
||||
[_grpPilot, 0] setWaypointType "SAD";
|
||||
[_grpPilot, 0] setWaypointType "SENTRY";
|
||||
[_grpPilot, 0] setWaypointSpeed "NORMAL";
|
||||
[_grpPilot, 0] setWaypointBehaviour "CARELESS";
|
||||
[_grpPilot, 0] setWaypointBehaviour "AWARE";
|
||||
[_grpPilot, 0] setWaypointStatements ["true","[group this, 0] setCurrentWaypoint [group this,0];"];
|
||||
[_grpPilot,0] setWaypointTimeout [10000,15000,20000];
|
||||
[_grpPilot,0] setWaypointTimeout [20,30,40];
|
||||
_grpPilot setCurrentWaypoint [_grpPilot,0];
|
||||
|
||||
#ifdef blck_debugMode
|
||||
|
@ -25,44 +25,68 @@ _noPara = 0;
|
||||
_aborted = false;
|
||||
|
||||
if (_aiSkillsLevel isEqualTo "blue") then {
|
||||
|
||||
#ifdef blck_debugMode
|
||||
if (blck_debugON) then {diag_log "_fnc_spawnMissionParatroops: BLUE difficulty settings applied";};
|
||||
#endif
|
||||
|
||||
_chanceParatroops = blck_chanceParaBlue;
|
||||
_noPara = blck_noParaBlue;
|
||||
};
|
||||
if (_aiSkillsLevel isEqualTo "green") then {
|
||||
|
||||
#ifdef blck_debugMode
|
||||
if (blck_debugON) then {diag_log "_fnc_spawnMissionParatroops: GREEN difficulty settings applied";};
|
||||
#endif
|
||||
|
||||
_chanceParatroops = blck_chanceParaGreen;
|
||||
_noPara = blck_noParaGreen;
|
||||
};
|
||||
if (_aiSkillsLevel isEqualTo "orange") then {
|
||||
|
||||
#ifdef blck_debugMode
|
||||
if (blck_debugON) then {diag_log "_fnc_spawnMissionParatroops: ORANGE difficulty settings applied";};
|
||||
#endif
|
||||
|
||||
_chanceParatroops = blck_chanceParaOrange;
|
||||
_noPara = blck_noParaOrange;
|
||||
};
|
||||
if (_aiSkillsLevel isEqualTo "red") then {
|
||||
|
||||
#ifdef blck_debugMode
|
||||
if (blck_debugON) then {diag_log "_fnc_spawnMissionParatroops: RED difficulty settings applied";};
|
||||
#endif
|
||||
|
||||
_chanceParatroops = blck_chanceParaRed;
|
||||
_noPara = blck_noParaRed;
|
||||
};
|
||||
|
||||
#ifdef blck_debugMode
|
||||
if (blck_debugLevel > 2) then {diag_log format["_fnc_spawnMissionParatroops (47): _chanceParatroops %1",_chanceParatroops];};
|
||||
if (blck_debugLevel > 2) then {diag_log format["_fnc_spawnMissionParatroops (48): _coords %1 | _numAI %2 | _skillAI %3 | _grpParatroops %4 | _heli %5",_coords,_noPara,_skillAI,_grpParatroops,_heli];};
|
||||
|
||||
#endif
|
||||
|
||||
if ( (random(1) < _chanceParatroops)) then
|
||||
{
|
||||
if (isNull _grpParatroops) then
|
||||
{
|
||||
_grpParatroops = createGroup blck_AI_Side;
|
||||
|
||||
#ifdef blck_debugMode
|
||||
if (blck_debugLevel > 2) then
|
||||
{
|
||||
diag_log format["_fnc_spawnMissionParatroops (53):No group passed as a parameter, _grpParatroops %4 created",_grpParatroops];
|
||||
};
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef blck_debugMode
|
||||
if (blck_debugLevel > 2) then
|
||||
{
|
||||
diag_log format["_fnc_spawnMissionParatroops (58): function running and group %1 successfully created; now calling blck_fnc_spawnParaUnits",_grpParatroops];
|
||||
};
|
||||
#endif
|
||||
|
||||
//params["_missionPos","_paraGroup",["_numAI",3],"_skillAI","_weapons","_uniforms","_headGear",["_heli",objNull]];
|
||||
_aborted = [_coords,_grpParatroops,_noPara,_skillAI,_weapons,_uniforms,_headGear,_heli] call blck_fnc_spawnParaUnits;
|
||||
//diag_log format["_fnc_spawnMissionParatroops: blck_fnc_spawnParaUnits returned a value of %1",_aborted];
|
||||
@ -76,6 +100,9 @@ if (_aborted) then
|
||||
_return = [(units _grpParatroops),false];
|
||||
};
|
||||
|
||||
#ifdef blck_debugMode
|
||||
diag_log format["_fnc_spawnMissionParatroops:-> _return = %1 | _abort = %2",_return,_aborted];
|
||||
#endif
|
||||
|
||||
_return
|
||||
|
||||
|
@ -14,7 +14,11 @@
|
||||
params["_missionPos","_paraGroup","_numAI","_skillAI","_weapons","_uniforms","_headGear",["_heli",objNull]];
|
||||
private["_arc","_dir","_spawnPos","_chute","_unit","_launcherType","_aborted"];
|
||||
_aborted = false;
|
||||
|
||||
#ifdef blck_debugMode
|
||||
diag_log format["_fnc_spawnParaUnits (17)::_missionPos %1 | _paraGroup %2 | _numAI %3 | _skillAI %4 | _heli = %5",_missionPos,_paraGroup,_numAI,_skillAI,_heli];
|
||||
#endif
|
||||
|
||||
if (isNull _paraGroup) then
|
||||
{
|
||||
_aborted = true;
|
||||
@ -43,9 +47,16 @@ if (isNull _paraGroup) then
|
||||
//params["_pos","_minDis","_maxDis","_group"];
|
||||
[_missionPos,10,20,_paraGroup] call blck_fnc_setupWaypoints;
|
||||
|
||||
#ifdef blck_debugMode
|
||||
diag_log "_fnc_spawnParaUnits (44): All Units spawned";
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
#ifdef blck_debugMode
|
||||
diag_log format["_fnc_spawnParaUnits: _aborted = %1",_aborted];
|
||||
#endif
|
||||
|
||||
_aborted;
|
||||
|
||||
|
||||
|
@ -55,10 +55,14 @@ if ( (_chanceHeliPatrol > 0) && (random (1) < _chanceHeliPatrol) ) then // if he
|
||||
{
|
||||
_temp = [objNull,[],false];
|
||||
//params["_coords","_aiSkillsLevel",,"_weapons","_uniforms","_headgear""_helis"];
|
||||
|
||||
#ifdef blck_debugMode
|
||||
if (blck_debugLevel > 2) then
|
||||
{
|
||||
diag_log "_fnc_spawnMissionReinforcements (64): calling _fnc_spawnMissionHeli to spawn heli and paratroops";
|
||||
};
|
||||
#endif
|
||||
|
||||
_temp = [_coords,_aiSkillsLevel,_weapons,_uniforms,_headgear,_missionHelis] call blck_fnc_spawnMissionHeli;
|
||||
if (typeName _temp isEqualTo "ARRAY") then
|
||||
{
|
||||
@ -68,15 +72,23 @@ if ( (_chanceHeliPatrol > 0) && (random (1) < _chanceHeliPatrol) ) then // if he
|
||||
{
|
||||
_return = [objNull, [], true];
|
||||
};
|
||||
|
||||
#ifdef blck_debugMode
|
||||
if (blck_debugLevel > 2) then {diag_log format["_fnc_spawnMissionReinforcements (66): blck_fnc_spawnMissionHeli returned value of %1 for _return",_return];};
|
||||
#endif
|
||||
|
||||
} else {
|
||||
if (blck_debugLevel > 2) then {diag_log "_fnc_spawnMissionReinforcements (68): calling _fnc_spawnMissionParatroops to spawn para reinforcements";};
|
||||
_temp = [objNull,[],false];
|
||||
// params["_coords","_skillAI","_weapons","_uniforms","_headgear"];
|
||||
_temp = [_coords,_aiSkillsLevel,_weapons,_uniforms,_headgear] call blck_fnc_spawnMissionParatroops;
|
||||
|
||||
#ifdef blck_debugMode
|
||||
if (blck_debugLevel > 2) then {
|
||||
diag_log format["_fnc_spawnMissionReinforcements (71):: blck_fnc_spawnMissionParatroops returned value for _paratroops of %1",_temp];
|
||||
};
|
||||
#endif
|
||||
|
||||
if (typeName _temp isEqualTo "ARRAY") then
|
||||
{
|
||||
_return = [objNull, _temp select 0 /*units*/, _temp select 1 /*true/false*/];
|
||||
@ -84,5 +96,9 @@ if ( (_chanceHeliPatrol > 0) && (random (1) < _chanceHeliPatrol) ) then // if he
|
||||
_return = [objNull, [],true];
|
||||
};
|
||||
};
|
||||
|
||||
#ifdef blck_debugMode
|
||||
if (blck_debugLevel > 1) then {diag_log format["_fnc_spawnMissionReinforcements (74):: _return = %1",_return];};
|
||||
_return
|
||||
#endif
|
||||
|
||||
_return
|
||||
|
@ -14,16 +14,23 @@
|
||||
|
||||
private["_veh","_modType"];
|
||||
params["_vehType","_pos",["_clearInventory",true]];
|
||||
|
||||
#ifdef blck_debugMode
|
||||
if (blck_debugLevel > 2) then {diag_log format["spawnVehicle.sqf: _vehType = %1 | _pos = %2",_vehType,_pos];};
|
||||
#endif
|
||||
|
||||
_veh = createVehicle[_vehType, _pos, [], 0, "NONE"];
|
||||
[_veh] call blck_fnc_protectVehicle;
|
||||
|
||||
#ifdef blck_debugMode
|
||||
if (blck_debugLevel > 2) then {diag_log format["spawnVehicle.sqf:: vehicle spawned is %1",_veh];};
|
||||
#endif
|
||||
// params["_veh",["_clearInventory",true]];
|
||||
[_veh,_clearInventory] call blck_fnc_configureMissionVehicle;
|
||||
|
||||
#ifdef blck_debugMode
|
||||
diag_log format["spawnVehicle:: returning parameter _veh = %1",_veh];
|
||||
#endif
|
||||
|
||||
_veh
|
||||
|
||||
|
@ -25,19 +25,24 @@ params["_center","_pos",["_vehType","I_G_Offroad_01_armed_F"],["_minDis",30],["_
|
||||
//_maxDis = maximum distance from the center of the mission for vehicle waypoints
|
||||
//_groupForVehiclePatrol = The group with which to man the vehicle
|
||||
|
||||
#ifdef blck_debugMode
|
||||
if (blck_debugLevel > 2) then
|
||||
{
|
||||
diag_log format["_fnc_spawnVehiclePatrol:: _center = %1 | _pos = %2 | _vehType = %3 | _group = %4",_center,_pos,_vehType,_group];
|
||||
};
|
||||
#endif
|
||||
|
||||
if !(isNull _group) then
|
||||
{ // exitWith {diag_log "[blckeagls] ERROR CONDITION:-->> NULL-GROUP Provided to _fnc_spawnVehiclePatrol"; objNull;};
|
||||
_veh = [_vehType,_pos] call blck_fnc_spawnVehicle;
|
||||
|
||||
#ifdef blck_debugMode
|
||||
if (blck_debugLevel > 2) then
|
||||
{
|
||||
diag_log format["spawnVehiclePatrol:: vehicle spawned is %1 of typeof %2",_veh, typeOf _veh];
|
||||
};
|
||||
#endif
|
||||
|
||||
private["_unitNumber"];
|
||||
_unitNumber = 0;
|
||||
|
||||
@ -56,7 +61,6 @@ if !(isNull _group) then
|
||||
deleteWaypoint ((waypoints _group) select 0);
|
||||
};
|
||||
|
||||
|
||||
_count = 5;
|
||||
_start = _center getDir _pos;
|
||||
_angle = _start;
|
||||
@ -77,22 +81,26 @@ if !(isNull _group) then
|
||||
};
|
||||
_wp setWaypointType "MOVE";
|
||||
_wp setWaypointName "move";
|
||||
_wp setWaypointBehaviour "COMBAT";
|
||||
_wp setWaypointCombatMode "RED";
|
||||
_wp setWaypointBehaviour "AWARE";
|
||||
_wp setWaypointCombatMode blck_combatMode;
|
||||
_wp setWaypointTimeout [1,1.1,1.2];
|
||||
_wp = _group addWaypoint [_p2, 25];
|
||||
_wp setWaypointType "SENTRY";
|
||||
_wp setWaypointName "sentry";
|
||||
_wp setWaypointBehaviour "COMBAT";
|
||||
_wp setWaypointCombatMode "RED";
|
||||
_wp setWaypointBehaviour "AWARE";
|
||||
_wp setWaypointCombatMode blck_combatMode;
|
||||
_wp setWaypointTimeout [10,17.5,25];
|
||||
};
|
||||
_wp = _group addWaypoint [_pos, 25];
|
||||
_wp setWaypointType "CYCLE";
|
||||
_group setVariable["wpIndex",0];
|
||||
};
|
||||
|
||||
#ifdef blck_debugMode
|
||||
if (blck_debugLevel > 1) then
|
||||
{
|
||||
diag_log format["_fnc_spawnVehiclePatrol::->> _veh = %1",_veh];
|
||||
};
|
||||
#endif
|
||||
|
||||
_veh
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
private ["_veh","_vehList"];
|
||||
_vehList = blck_missionVehicles;
|
||||
|
||||
/*
|
||||
_fn_releaseVehicle = {
|
||||
params["_v"];
|
||||
//diag_log format["vehicleMonitor.sqf: make vehicle available to players; stripping eventHandlers from _v %1",_v];
|
||||
@ -20,12 +20,15 @@ _fn_releaseVehicle = {
|
||||
_v setVehicleLock "UNLOCKED" ;
|
||||
_v setVariable["releasedToPlayers",true];
|
||||
[_v] call blck_fnc_emptyObject;
|
||||
{
|
||||
_v removealleventhandlers _x;
|
||||
}forEach["fired","hit","hitpart","reloaded","dammaged","HandleDamage"];
|
||||
if (blck_debugLevel > 2) then
|
||||
{
|
||||
diag_log format["_fnc_vehicleMonitor:: case of patrol vehicle released to players where vehicle = %1",_v];
|
||||
};
|
||||
};
|
||||
|
||||
*/
|
||||
//if (blck_debugLevel > 1) then {diag_log format["_fnc_vehicleMonitor:: function called at %1",diag_tickTime];};
|
||||
{
|
||||
_veh = _x;
|
||||
@ -47,7 +50,7 @@ _fn_releaseVehicle = {
|
||||
_veh setDamage 1;
|
||||
_veh setVariable["blck_DeleteAt",diag_tickTime + 60];
|
||||
} else {
|
||||
[_veh] call _fn_releaseVehicle;
|
||||
[_veh] call blck_fnc_releaseVehicleToPlayers;
|
||||
};
|
||||
}else { // Deal with vehicles
|
||||
if (blck_killEmptyAIVehicles) then
|
||||
@ -59,7 +62,7 @@ _fn_releaseVehicle = {
|
||||
} forEach ["HitLFWheel","HitLF2Wheel","HitRFWheel","HitRF2Wheel","HitEngine","HitLBWheel","HitLMWheel","HitRBWheel","HitRMWheel","HitTurret","HitGun","HitTurret","HitGun","HitTurret","HitGun","HitTurret","HitGun"];
|
||||
_veh setVariable["blck_DeleteAt",diag_tickTime + 60];
|
||||
} else {
|
||||
[_veh] call _fn_releaseVehicle;
|
||||
[_veh] call blck_fnc_releaseVehicleToPlayers;
|
||||
};
|
||||
};
|
||||
} else { // Add magazine to vehicle if possible
|
||||
|
@ -30,6 +30,7 @@ blck_fnc_playerInRange = compileFinal preprocessFileLineNumbers "\q\addons\cust
|
||||
blck_fnc_playerInRangeArray = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_playerInRangeArray.sqf"; // GMS_fnc_playerInRangeArray
|
||||
blck_fnc_mainThread = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_mainThread.sqf";
|
||||
blck_fnc_allPlayers = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_allPlayers.sqf";
|
||||
blck_fnc_alertNearbyLeader = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_alertNearbyLeader.sqf";
|
||||
|
||||
#ifdef DBDserver
|
||||
blck_fnc_broadcastServerFPS = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_broadcastServerFPS.sqf";
|
||||
@ -85,6 +86,7 @@ blck_fnc_setupWaypoints = compileFinal preprocessFileLineNumbers "\q\addons\cus
|
||||
blck_fnc_missionGroupMonitor = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_missionGroupMonitor.sqf"; // Monitors active groups for those that are stuck in an SAD waypoint but not in combat
|
||||
blck_fnc_changeToSADWaypoint = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_changeToSADWaypoint.sqf";
|
||||
blck_fnc_changeToMoveWaypoint = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_changeToMoveWaypoint.sqf";
|
||||
blck_fnc_changeToSentryWaypoint = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_changeToSentryWaypoint.sqf"; //
|
||||
blck_fnc_setNextWaypoint = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_setNextWaypoint.sqf";
|
||||
blck_fnc_cleanEmptyGroups = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_cleanEmptyGroups.sqf"; // GMS_fnc_cleanEmptyGroups
|
||||
|
||||
@ -98,7 +100,8 @@ blck_fnc_spawnMissionReinforcements = compileFinal preprocessFileLineNumbers "\
|
||||
blck_fnc_spawnMissionHeli = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnMissionHeli.sqf";
|
||||
blck_fnc_spawnMissionParatroops = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnMissionParatroops.sqf"; // Lumped here because these 'jump' from aircraft
|
||||
blck_fnc_spawnParaUnits = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnParaUnits.sqf"; // Lumped here because these 'jump' from aircraft
|
||||
|
||||
blck_fnc_releaseVehicleToPlayers = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_releaseVehicleToPlayers.sqf"; // GMS_fnc_releaseVehicleToPlayers
|
||||
|
||||
// functions to support Units
|
||||
blck_fnc_removeGear = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_removeGear.sqf"; // Strip an AI unit of all gear.
|
||||
blck_fnc_spawnAI = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_spawnUnit.sqf"; // spawn individual AI
|
||||
|
@ -42,22 +42,6 @@
|
||||
blck_blacklistSpawns = false;
|
||||
blck_listConcreteMixerZones = false;
|
||||
|
||||
// list of locations that are protected against mission spawns
|
||||
|
||||
switch (toLower(worldName)) do
|
||||
{
|
||||
case "altis": {
|
||||
blck_locationBlackList append [
|
||||
//Add location as [[xpos,ypos,0],minimumDistance],
|
||||
// Note that there should not be a comma after the last item in this table
|
||||
[[10800,10641,0],1000] // isthmus - missions that spawn here often are glitched.
|
||||
];
|
||||
};
|
||||
case "tanoa": {
|
||||
blck_locationBlackList append [ ];
|
||||
};
|
||||
};
|
||||
|
||||
/***********************************************************
|
||||
|
||||
GENERAL MISSION SYSTEM CONFIGURATION
|
||||
@ -181,6 +165,7 @@
|
||||
#ifdef DBDserver
|
||||
blck_maxSpawnedMissions = 6;
|
||||
#else
|
||||
// Change this value to reduce the number of spawned missions at any one time.
|
||||
blck_maxSpawnedMissions = 4;
|
||||
#endif
|
||||
|
||||
@ -228,9 +213,8 @@
|
||||
///////////////////////////////
|
||||
|
||||
blck_useVehiclePatrols = true; // When true vehicles will be spawned at missions and will patrol the mission area.
|
||||
blck_killEmptyAIVehicles = false; // when true, the AI vehicle will be extensively damaged once all AI have gotten out.
|
||||
blck_AIPatrolVehicles = ["B_G_Offroad_01_armed_EPOCH","B_LSV_01_armed_F"]; // Type of vehicle spawned to defend AI bases
|
||||
|
||||
blck_killEmptyAIVehicles = false; // when true, the AI vehicle will be extensively damaged once all AI have gotten outor been killed.
|
||||
|
||||
////////////////////
|
||||
// Mission Vehicle Settings
|
||||
////////////////////
|
||||
@ -266,6 +250,7 @@
|
||||
|
||||
****************************************************************/
|
||||
|
||||
blck_groupBehavior = "AWARE";
|
||||
blck_combatMode = "RED"; // Change this to "YELLOW" if the AI wander too far from missions for your tastes.
|
||||
blck_groupFormation = "WEDGE"; // Possibilities include "WEDGE","VEE","FILE","DIAMOND"
|
||||
blck_AI_Side = RESISTANCE;
|
||||
|
@ -17,12 +17,31 @@
|
||||
////////////
|
||||
// Epoch-specific settings
|
||||
////////////
|
||||
|
||||
// list of locations that are protected against mission spawns
|
||||
|
||||
switch (toLower(worldName)) do
|
||||
{
|
||||
case "altis": {
|
||||
blck_locationBlackList append [
|
||||
//Add location as [[xpos,ypos,0],minimumDistance],
|
||||
// Note that there should not be a comma after the last item in this table
|
||||
[[10800,10641,0],1000] // isthmus - missions that spawn here often are glitched.
|
||||
];
|
||||
};
|
||||
case "tanoa": {
|
||||
blck_locationBlackList append [ ];
|
||||
};
|
||||
};
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
AI WEAPONS, UNIFORMS, VESTS AND GEAR
|
||||
|
||||
**********************************************************************************/
|
||||
|
||||
blck_AIPatrolVehicles = ["B_G_Offroad_01_armed_EPOCH","B_LSV_01_armed_F"]; // Type of vehicle spawned to defend AI bases
|
||||
|
||||
#define useAPEX 1
|
||||
|
||||
// Blacklisted itesm
|
||||
@ -822,4 +841,4 @@ for examples of how you can do this see \Major\Compositions.sqf
|
||||
blck_crateTypes = ["Box_FIA_Ammo_F","Box_FIA_Support_F","Box_FIA_Wps_F","I_SupplyCrate_F","Box_NATO_AmmoVeh_F","Box_East_AmmoVeh_F","IG_supplyCrate_F","Box_NATO_Wps_F","I_CargoNet_01_ammo_F","O_CargoNet_01_ammo_F","B_CargoNet_01_ammo_F"]; // Default crate type.
|
||||
|
||||
diag_log "[blckeagls] Configurations for Epoch Loaded";
|
||||
blck_configsEpochLoaded = true;
|
||||
blck_configsEpochLoaded = true;
|
||||
|
@ -17,6 +17,22 @@
|
||||
////////////
|
||||
// Exile-specific settings
|
||||
////////////
|
||||
|
||||
// list of locations that are protected against mission spawns
|
||||
|
||||
switch (toLower(worldName)) do
|
||||
{
|
||||
case "altis": {
|
||||
blck_locationBlackList append [
|
||||
//Add location as [[xpos,ypos,0],minimumDistance],
|
||||
// Note that there should not be a comma after the last item in this table
|
||||
[[10800,10641,0],1000] // isthmus - missions that spawn here often are glitched.
|
||||
];
|
||||
};
|
||||
case "tanoa": {
|
||||
blck_locationBlackList append [ ];
|
||||
};
|
||||
};
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
@ -24,6 +40,8 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR
|
||||
|
||||
**********************************************************************************/
|
||||
|
||||
blck_AIPatrolVehicles = ["Exile_Car_Offroad_Armed_Guerilla01","Exile_Car_Offroad_Armed_Guerilla02","Exile_Car_BTR40_MG_Green","Exile_Car_BTR40_MG_Camo","Exile_Car_HMMWV_M134_Green","Exile_Car_HMMWV_M134_Desert",/*"Exile_Car_HMMWV_M134_Desert","Exile_Car_HMMWV_M2_Desert",*/"B_LSV_01_armed_F"]; // Type of vehicle spawned to defend AI bases
|
||||
|
||||
// Blacklisted itesm
|
||||
blck_blacklistedOptics = ["optic_Nightstalker","optic_tws","optic_tws_mg"];
|
||||
|
||||
@ -43,6 +61,8 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR
|
||||
//"optic_tws",
|
||||
//"optic_tws_mg",
|
||||
];
|
||||
|
||||
#ifdef useAPEX
|
||||
blck_Optics_Apex = [
|
||||
//Apex
|
||||
"optic_Arco_blk_F", "optic_Arco_ghex_F",
|
||||
@ -54,10 +74,9 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR
|
||||
"optic_Holosight_blk_F","optic_Holosight_khk_F","optic_Holosight_smg_blk_F"
|
||||
];
|
||||
blck_Optics = blck_Optics_Holo + blck_Optics_Reticule + blck_Optics_Scopes;
|
||||
|
||||
#ifdef useAPEX
|
||||
blck_Optics = blck_Optics + blck_Optics_Apex;
|
||||
#endif
|
||||
|
||||
blck_bipods = [
|
||||
"bipod_01_F_blk","bipod_01_F_mtp","bipod_01_F_snd","bipod_02_F_blk","bipod_02_F_hex","bipod_02_F_tan","bipod_03_F_blk","bipod_03_F_oli",
|
||||
//Apex
|
||||
@ -108,11 +127,7 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR
|
||||
blck_DLC_Sniper = [
|
||||
"srifle_DMR_02_camo_F","srifle_DMR_02_F","srifle_DMR_02_sniper_F","srifle_DMR_03_F","srifle_DMR_03_tan_F","srifle_DMR_04_F","srifle_DMR_04_Tan_F","srifle_DMR_05_blk_F","srifle_DMR_05_hex_F","srifle_DMR_05_tan_F","srifle_DMR_06_camo_F","srifle_DMR_06_olive_F"
|
||||
];
|
||||
blck_apexWeapons = ["arifle_AK12_F","arifle_AK12_GL_F","arifle_AKM_F","arifle_AKM_FL_F","arifle_AKS_F","arifle_ARX_blk_F","arifle_ARX_ghex_F","arifle_ARX_hex_F","arifle_CTAR_blk_F","arifle_CTAR_hex_F",
|
||||
"arifle_CTAR_ghex_F","arifle_CTAR_GL_blk_F","arifle_CTARS_blk_F","arifle_CTARS_hex_F","arifle_CTARS_ghex_F","arifle_SPAR_01_blk_F","arifle_SPAR_01_khk_F","arifle_SPAR_01_snd_F",
|
||||
"arifle_SPAR_01_GL_blk_F","arifle_SPAR_01_GL_khk_F","arifle_SPAR_01_GL_snd_F","arifle_SPAR_02_blk_F","arifle_SPAR_02_khk_F","arifle_SPAR_02_snd_F","arifle_SPAR_03_blk_F",
|
||||
"arifle_SPAR_03_khk_F","arifle_SPAR_03_snd_F","arifle_MX_khk_F","arifle_MX_GL_khk_F","arifle_MXC_khk_F","arifle_MXM_khk_F"];
|
||||
|
||||
|
||||
//This defines the random weapon to spawn on the AI
|
||||
//https://community.bistudio.com/wiki/Arma_3_CfgWeapons_Weapons
|
||||
blck_WeaponList_Orange = blck_RifleSniper + blck_RifleAsault_650 + blck_RifleLMG + blck_DLC_Sniper + blck_DLC_MMG + blck_apexWeapons;
|
||||
@ -121,20 +136,26 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR
|
||||
blck_WeaponList_Red = blck_RifleAsault_556 + blck_RifleSniper + blck_RifleAsault_650 + blck_RifleLMG;
|
||||
|
||||
#ifdef useAPEX
|
||||
blck_apexWeapons = ["arifle_AK12_F","arifle_AK12_GL_F","arifle_AKM_F","arifle_AKM_FL_F","arifle_AKS_F","arifle_ARX_blk_F","arifle_ARX_ghex_F","arifle_ARX_hex_F","arifle_CTAR_blk_F","arifle_CTAR_hex_F",
|
||||
"arifle_CTAR_ghex_F","arifle_CTAR_GL_blk_F","arifle_CTARS_blk_F","arifle_CTARS_hex_F","arifle_CTARS_ghex_F","arifle_SPAR_01_blk_F","arifle_SPAR_01_khk_F","arifle_SPAR_01_snd_F",
|
||||
"arifle_SPAR_01_GL_blk_F","arifle_SPAR_01_GL_khk_F","arifle_SPAR_01_GL_snd_F","arifle_SPAR_02_blk_F","arifle_SPAR_02_khk_F","arifle_SPAR_02_snd_F","arifle_SPAR_03_blk_F",
|
||||
"arifle_SPAR_03_khk_F","arifle_SPAR_03_snd_F","arifle_MX_khk_F","arifle_MX_GL_khk_F","arifle_MXC_khk_F","arifle_MXM_khk_F"];
|
||||
|
||||
blck_WeaponList_Orange = blck_WeaponList_Orange + blck_apexWeapons;
|
||||
blck_WeaponList_Green = blck_WeaponList_Green + blck_apexWeapons;
|
||||
#endif
|
||||
|
||||
blck_baseBackpacks = ["B_Carryall_ocamo","B_Carryall_oucamo","B_Carryall_mcamo","B_Carryall_oli","B_Carryall_khk","B_Carryall_cbr" ];
|
||||
|
||||
#ifdef useAPEX
|
||||
blck_ApexBackpacks = [
|
||||
"B_Bergen_mcamo_F","B_Bergen_dgtl_F","B_Bergen_hex_F","B_Bergen_tna_F","B_AssaultPack_tna_F","B_Carryall_ghex_F",
|
||||
"B_FieldPack_ghex_F","B_ViperHarness_blk_F","B_ViperHarness_ghex_F","B_ViperHarness_hex_F","B_ViperHarness_khk_F",
|
||||
"B_ViperHarness_oli_F","B_ViperLightHarness_blk_F","B_ViperLightHarness_ghex_F","B_ViperLightHarness_hex_F","B_ViperLightHarness_khk_F","B_ViperLightHarness_oli_F"
|
||||
];
|
||||
|
||||
#ifdef useAPEX
|
||||
];
|
||||
blck_backpacks = blck_baseBackpacks + blck_ApexBackpacks;
|
||||
#endif
|
||||
|
||||
blck_BanditHeadgear = ["H_Shemag_khk","H_Shemag_olive","H_Shemag_tan","H_ShemagOpen_khk"];
|
||||
//This defines the skin list, some skins are disabled by default to permit players to have high visibility uniforms distinct from those of the AI.
|
||||
blck_headgear = [
|
||||
@ -412,7 +433,7 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR
|
||||
"V_PlateCarrierL_CTRG",
|
||||
"V_PlateCarrierSpec_blk",
|
||||
"V_PlateCarrierSpec_mtp",
|
||||
"V_PlateCarrierSpec_rgr",
|
||||
#ifdef useAPEX
|
||||
//Apex
|
||||
"V_TacChestrig_grn_F",
|
||||
"V_TacChestrig_oli_F",
|
||||
@ -426,6 +447,7 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR
|
||||
"V_BandollierB_ghex_F",
|
||||
"V_TacVest_gen_F",
|
||||
"V_PlateCarrier1_rgr_noflag_F",
|
||||
#endif
|
||||
"V_PlateCarrier2_rgr_noflag_F"
|
||||
];
|
||||
|
||||
|
@ -4,6 +4,10 @@ Loosely based on the AI mission system by blckeagls ver 2.0.2
|
||||
Contributions by Narines: bug fixes, testing, infinite ammo fix.
|
||||
Ideas or code from that by Vampire and KiloSwiss have been used for certain functions.
|
||||
|
||||
3/23/17 Verision 6.58 build 46
|
||||
Turned debugging off
|
||||
Added some preprocessor commands to minimize the use of if()then for debugging purposes when running without any debugging settings on.
|
||||
|
||||
3/21/17 Version 6.58 Build 44
|
||||
[Added] Each mission now has a setting for mines which is set to false. To use the global setting in blck_config for yoru mission just change this to read:
|
||||
_useMines = blck_useMines;
|
||||
|
@ -1,3 +1,3 @@
|
||||
private ["_version","_versionDate"];
|
||||
_blck_version = "6.58 Build 47";
|
||||
_blck_versionDate = "3-23-17 8:00 AM";
|
||||
_blck_version = "6.58 Build 48";
|
||||
_blck_versionDate = "3-23-17 8:00 PM";
|
||||
|
Reference in New Issue
Block a user