See the Changelog for a full list of changes.

This commit is contained in:
Ghostrider-DbD- 2017-04-30 21:58:38 -04:00
parent 757fd07fdc
commit 9e03feb468
48 changed files with 701 additions and 408 deletions

View File

@ -41,8 +41,7 @@ while {true} do
[] call blck_fnc_cleanupAliveAI; [] call blck_fnc_cleanupAliveAI;
[] call blck_fnc_cleanupObjects; [] call blck_fnc_cleanupObjects;
[] call blck_fnc_cleanupDeadAI; [] call blck_fnc_cleanupDeadAI;
[] call blck_fnc_missionGroupMonitor;
//[] call blck_fnc_missionGroupMonitor;
_timer20sec = diag_tickTime; _timer20sec = diag_tickTime;
//diag_log format["_mainThread::-->> diag_tickTime = %1",diag_tickTime]; //diag_log format["_mainThread::-->> diag_tickTime = %1",diag_tickTime];
}; };
@ -50,6 +49,7 @@ while {true} do
{ {
_timer1min = diag_tickTime; _timer1min = diag_tickTime;
[] call blck_fnc_spawnPendingMissions; [] call blck_fnc_spawnPendingMissions;
//[] call blck_fnc_missionGroupMonitor;
if (_modType isEqualTo "Epoch") then if (_modType isEqualTo "Epoch") then
{ {
[] call blck_fnc_cleanEmptyGroups; [] call blck_fnc_cleanEmptyGroups;

View File

@ -3,7 +3,7 @@
for DBD Clan for DBD Clan
By Ghostrider-DBD- By Ghostrider-DBD-
Copyright 2016 Copyright 2016
Last modified 3/14/17 Last modified 4/23/17
-------------------------- --------------------------
License License
@ -13,35 +13,81 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/ http://creativecommons.org/licenses/by-nc-sa/4.0/
*/ */
#include "\q\addons\custom_server\Configs\blck_defines.hpp"; #include "\q\addons\custom_server\Configs\blck_defines.hpp";
#ifdef blck_debugMode
//diag_log "_fnc_changeToMoveWaypoint: blck_debugMode enabled";
#endif
private["_group","_wp","_wpPos","_dis","_arc","_dir","_newPos","_marker","_center","_minDis","_maxDis"];
private["_group","_wp","_wpPos","_dis","_arc"];
//diag_log format["_fnc_changeToMoveWaypoint:: -- :: _this = %1 with typeName _this = %2",_this, typeName _this];
if !(typeName _this isEqualTo "OBJECT") exitWith {diag_log "_fnc_changeToSADWaypoint aborted for incorrect parameter. You must pass a unit in the group for this to function";};
_group = group _this; _group = group _this;
//diag_log format["_fnc_changeToMoveWaypoint:: -- >> group to update is %1 with typeName %2",_group, typeName _group]; _groupSpawned setcombatmode "YELLOW";
_groupSpawned setBehaviour "COMBAT";
_group setVariable["timeStamp",diag_tickTime]; _group setVariable["timeStamp",diag_tickTime];
_wp = [_group, 0]; _wp = [_group, 0];
_wpPos = getPos ((units _group) select 0); _wpPos = getPos ((units _group) select 0);
_dis = (_group getVariable["minDis"]) + random( (_group getVariable["maxDis"]) - (_group getVariable["minDis"])); _dir = _group getVariable["wpDir",0];
_center = _group getVariable ["patrolCenter",_wpPos];
if (_group getVariable["wpMode","random"] isEqualTo "random") then if (_group getVariable["wpMode","random"] isEqualTo "random") then
{ {
_arc = random(360); _dir = random(360);
} else { } else {
_arc = (_group getVariable["arc",0]) + 70; _dir = (_group getVariable["wpDir",0]) + 70;
_group setVariable["arc",_arc]; _group setVariable["wpDir",_dir];
}; };
_newPos = (_group getVariable ["patrolCenter",_wpPos]) getPos[_dis,_arc]; _minDis = _group getVariable["minDis",25];
_group setCurrentWaypoint _wp; _maxDis = _group getVariable["maxDis",30];
_dis = (_minDis) + random( (_maxDis) - (_minDis) );
_newPos = (_center) getPos[_dis,_dir];
_wp setWPPos [_newPos select 0, _newPos select 1];
_wp setWaypointCompletionRadius (_group getVariable["wpRadius",30]);
_wp setWaypointType "MOVE"; _wp setWaypointType "MOVE";
_wp setWaypointName "move"; _wp setWaypointName "move";
_wp setWaypointBehaviour blck_groupBehavior; _wp setWaypointBehaviour "COMBAT";
_wp setWaypointCombatMode blck_combatMode; _wp setWaypointCombatMode "YELLOW";
_wp setWaypointTimeout [1,1.1,1.2]; _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];"]; _group setCurrentWaypoint _wp;
_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];"]; #ifdef blck_debugMode
_wp setWaypointPosition _newPos; if (blck_debugLevel > 2) then
{
diag_log format["_fnc_changeToMoveWaypoint (4/25/17): _this = %1", _this];
diag_log format["_fnc_changeToMoveWaypoint: typeName _this = %1", typeName _this];
diag_log format["_fnc_changeToMoveWaypoint:_group = %1",_group];
diag_log format["_fnc_changeToMoveWaypoint:_group timestamp updated to %1", _group getVariable "timeStamp"];
diag_log format["_fnc_changeToMoveWaypoint:: -- >> wpMode %1 _dir %2 _dis %3 _center %4",_group getVariable["wpMode","random"], _dir, _dis,_center];
diag_log format["_fnc_changeToMoveWaypoint:: -- >> group to update is %1 and new position is %2",_group, _newPos];
diag_log format["_fnc_changeToMoveWaypoint:: -- >> group to update is %1 and new Waypoint position is %2",_group, getWPPos _wp];
diag_log format["_fnc_changeToMoveWaypoint:_group %1 basic waypoint parameters updates", _group getVariable "timeStamp"];
_marker =_group getVariable["wpMarker",""];
_marker setMarkerColor "ColorBlue";
diag_log format["_fnc_changeToMoveWaypoint:: -- >> Waypoint marker for group %1 have been configured as %2",_group, _group getVariable "wpMarker"];
};
#endif
if (_group getVariable["wpPatrolMode",""] isEqualTo "SAD") then
{
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_changeToMoveWaypoint: seting waypoint script for group %1 to SAD Mode",_group];
};
_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];"];
#else
_wp setWaypointStatements ["true","this call blck_fnc_changeToSADWaypoint;"];
#endif
};
if (_group getVariable["wpPatrolMode",""] isEqualTo "SENTRY") then
{
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_changeToMoveWaypoint: seting waypoint script for group %1 to SENTRY Mode",_group];
};
_wp setWaypointStatements ["true","this call blck_fnc_changeToSentryWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a SENTRY Waypoint',group this];"];
#else
_wp setWaypointStatements ["true","this call blck_fnc_changeToSentryWaypoint;"];
#endif
};
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_changeToMoveWaypoint:: -- >> Waypoint statements for group %1 have been configured as %2",_group, waypointStatements _wp];
};
#endif

View File

@ -3,7 +3,7 @@
for DBD Clan for DBD Clan
By Ghostrider-DBD- By Ghostrider-DBD-
Copyright 2016 Copyright 2016
Last modified 3/14/17 Last modified 4/29/17
-------------------------- --------------------------
License License
@ -14,20 +14,39 @@
*/ */
#include "\q\addons\custom_server\Configs\blck_defines.hpp"; #include "\q\addons\custom_server\Configs\blck_defines.hpp";
#ifdef blck_debugMode
diag_log "_fnc_changeToSADWaypoint: blck_debugMode enabled";
#endif
private["_group","_wp"]; private["_group","_wp"];
//diag_log format["_fnc_changeToSADWaypoint:: -- :: _this = %1 and typName _this %2",_this, typeName _this];
_group = group _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]; _group setVariable["timeStamp",diag_tickTime];
_group setcombatmode "RED";
_group setBehaviour "COMBAT";
_wp = [_group, 0]; _wp = [_group, 0];
_group setCurrentWaypoint _wp; _group setCurrentWaypoint _wp;
_wp setWaypointType "SAD"; _wp setWaypointType "SAD";
_wp setWaypointName "sad"; _wp setWaypointName "sad";
_wp setWaypointBehaviour blck_groupBehavior; _wp setWaypointBehaviour "COMBAT";
_wp setWaypointCombatMode blck_combatMode; _wp setWaypointCombatMode "RED";
_wp setWaypointTimeout [60,75,90]; _wp setWaypointTimeout [10,15,20];
#ifdef blck_debugMode
_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];"]; _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];"];
#else
_wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint;"];
#endif
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
private ["_marker"];
_marker = _group getVariable["wpMarker",""];
_marker setMarkerColor "ColorRed";
diag_log format["_fnc_changeToSADWaypoint:: -- :: _this = %1 and typName _this %2",_this, typeName _this];
diag_log format["_fnc_changeToSADWaypoint:: -- >> group to update is %1 with typeName %2",_group, typeName _group];
diag_log format["_fnc_changeToSADWaypoint:: -- >> Waypoint statements for group %1 have been configured as %2",_group, waypointStatements _wp];
diag_log format["_fnc_changeToSADWaypoint:: -- >> Waypoint marker for group %1 have been configured as %2",_group, _group getVariable "wpMarker"];
};
#endif

View File

@ -3,7 +3,7 @@
for DBD Clan for DBD Clan
By Ghostrider-DBD- By Ghostrider-DBD-
Copyright 2016 Copyright 2016
Last modified 3/14/17 Last modified 4/29/17
-------------------------- --------------------------
License License
@ -13,21 +13,37 @@
http://creativecommons.org/licenses/by-nc-sa/4.0/ http://creativecommons.org/licenses/by-nc-sa/4.0/
*/ */
#include "\q\addons\custom_server\Configs\blck_defines.hpp"; #include "\q\addons\custom_server\Configs\blck_defines.hpp";
#ifdef blck_debugMode
diag_log "_fnc_changeToSADWaypoint: blck_debugMode enabled";
#endif
private["_group","_wp"]; private["_group","_wp"];
//diag_log format["_fnc_changeToSADWaypoint:: -- :: _this = %1 and typName _this %2",_this, typeName _this];
_group = group _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]; _group setVariable["timeStamp",diag_tickTime];
_wp = [_group, 0]; _wp = [_group, 0];
_group setCurrentWaypoint _wp; _group setCurrentWaypoint _wp;
_group setcombatmode "RED";
_group setBehaviour "COMBAT";
_wp setWaypointType "SENTRY"; _wp setWaypointType "SENTRY";
_wp setWaypointName "sentry"; _wp setWaypointName "sentry";
_wp setWaypointBehaviour blck_groupBehavior; _wp setWaypointBehaviour "COMBAT";
_wp setWaypointCombatMode blck_combatMode; _wp setWaypointCombatMode "RED";
_wp setWaypointTimeout [60,75,90]; _wp setWaypointTimeout [10,15,20];
#ifdef blck_debugMode
_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];"]; _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];"];
#else
_wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint;"];
#endif
#ifdef blck_debugMode
if (blck_debugLevel >1) then
{
diag_log format["_fnc_changeToSentryWaypoint:: -- :: _this = %1 and typName _this %2",_this, typeName _this];
diag_log format["_fnc_changeToSentryWaypoint:: -- >> group to update is %1 with typeName %2",_group, typeName _group];
private ["_marker"];
_marker = _group getVariable["wpMarker",""];
_marker setMarkerColor "ColorYellow";
diag_log format["_fnc_changeToSentryWaypoint:: -- >> Waypoint statements for group %1 have been configured as %2",_group, waypointStatements _wp];
diag_log format["_fnc_changeToSentryWaypoint:: -- >> Waypoint marker for group %1 have been configured as %2",_group, _group getVariable "wpMarker"];
};
#endif

View File

@ -25,5 +25,6 @@ private _grp = allGroups;
//diag_log format["_fnc_cleanEmptyGroups:: - >> type of object _x = %1",typeName _x]; //diag_log format["_fnc_cleanEmptyGroups:: - >> type of object _x = %1",typeName _x];
if ((count units _x) isEqualTo 0) then {deleteGroup _x}; if ((count units _x) isEqualTo 0) then {deleteGroup _x};
}forEach _grp; }forEach _grp;
#ifdef blck_debugMode
if (blck_debugLevel > 2) then {diag_log "_fnc_cleanEmptyGroups:: -- >> exiting function";}; if (blck_debugLevel > 2) then {diag_log "_fnc_cleanEmptyGroups:: -- >> exiting function";};
#endif

View File

@ -0,0 +1,26 @@
// 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 4/23/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_emplacedWeaponWaypoint:: -- >> group to update is %1 with typeName %2",_group, typeName _group];
_group setVariable["timeStamp",diag_tickTime];
_wp = [_group, 0];
_group setCurrentWaypoint _wp;
diag_log format["_fnc_emplacedWeaponWaypoint:: -- >> group to update is %1 waypoints updated at %2",_group, (_group getVariable["timeStamp",diag_tickTime])];

View File

@ -17,8 +17,10 @@
*/ */
#include "\q\addons\custom_server\Configs\blck_defines.hpp"; #include "\q\addons\custom_server\Configs\blck_defines.hpp";
//diag_log format["_fnc_waypointMonitor::-->> running function at diag_tickTime = %1 with blck_fnc_missionGroupMonitor = %2",diag_tickTime,blck_monitoredMissionAIGroups]; //diag_log format["_fnc_missionGroupMonitor (4/29:4:09 PM)::-->> running function at diag_tickTime = %1 with blck_fnc_missionGroupMonitor = %2",diag_tickTime,blck_monitoredMissionAIGroups];
#ifdef blck_debugMode
//diag_log format["_fnc_missionGroupMonitor:: blck_debugMode defined"];
#endif
_fn_allPlayers = { _fn_allPlayers = {
private ["_players"]; private ["_players"];
_players = []; _players = [];
@ -75,34 +77,79 @@ _fn_removeEmptyOrNullGroups = {
_fn_monitorGroupWaypoints = { _fn_monitorGroupWaypoints = {
{ {
private["_timeStamp","_index","_unit"]; private["_timeStamp","_index","_unit","_soldierType"];
_timeStamp = _x getVariable ["timeStamp",0]; _timeStamp = _x getVariable ["timeStamp",0];
if (_timeStamp isEqualTo 0) then { if (_timeStamp isEqualTo 0) then {
_group setVariable["timeStamp",diag_tickTime]; _x setVariable["timeStamp",diag_tickTime];
//diag_log format["_fn_monitorGroupWaypoints::--> updating timestamp for group %1 at time %2",__x,diag_tickTime]; //diag_log format["_fn_monitorGroupWaypoints::--> updating timestamp for group %1 at time %2",_x,diag_tickTime];
}; };
if (diag_tickTime > (_x getVariable "timeStamp") + 300) then _soldierType = _x getVariable["soldierType","null"];
//diag_log format["_fn_monitorGroupWaypoints::--> soldierType for group %1 = %2 and timeStamp = %3",_x,_soldierType,_timeStamp];
if (_soldierType isEqualTo "infantry") then
{ {
if !([_x] call _fn_inCombat) then if (diag_tickTime > (_x getVariable "timeStamp") + 60) then
{ {
_units = [_x] call _fn_aliveGroupUnits; _units = [_x] call _fn_aliveGroupUnits;
if (count _units > 0) then if (count _units > 0) then
{ {
_u = _units select 0; private _leader = leader _x;
if (vehicle _u isEqualTo _u) then // Only do this for foot patrols at present. (_leader) call blck_fnc_changeToMoveWaypoint;
#ifdef blck_debugMode
if (blck_debugLevel > 2) then {diag_log format["_fnc_missionGroupMonitor: infantry group %1 stuck, waypoint reset",_x];};
#endif
/*
if ( (getPos _leader) distance2d (_group getVariable "patrolCenter") > 200) then
{ {
_index = currentWaypoint _x;
if ( (waypointName [_x, _index]) isEqualTo "move") then {
//diag_log format["_fn_monitorGroupWaypoints:: -- >> updating waypoint for group %1 to SAD at %2",_x,diag_tickTime];
[_u] call blck_fnc_changetoSADWaypoint;
}; };
if ( (waypointName [_x, _index])isEqualTo "sad") then { */
//diag_log format["_fn_monitorGroupWaypoints:: -- >> updating waypoint for group %1 to Move at %2",_x,diag_tickTime]; };
[_u] call blck_fnc_changeToMoveWaypoint;
}; };
}; };
if (_soldierType isEqualTo "vehicle") then
{
if (diag_tickTime > (_x getVariable "timeStamp") + 60) then
{
_units = [_x] call _fn_aliveGroupUnits;
if (count _units > 0) then
{
private _leader = leader _x;
(_leader) call blck_fnc_changeToMoveWaypoint;
#ifdef blck_debugMode
if (blck_debugLevel > 2) then {diag_log format["_fnc_missionGroupMonitor: vehicle group %1 stuck, waypoint reset",_x];};
#endif
/*
if ( (getPos _leader) distance2d (_group getVariable "patrolCenter") > 200) then
{
}; };
*/
};
};
};
if (_soldierType isEqualTo "helicopter") then
{
if (diag_tickTime > (_x getVariable "timeStamp") + 60) then
{
_units = [_x] call _fn_aliveGroupUnits;
if (count _units > 0) then
{
private _leader = leader _x;
(_leader) call blck_fnc_changeToMoveWaypoint;
#ifdef blck_debugMode
if (blck_debugLevel > 2) then {diag_log format["_fnc_missionGroupMonitor: helicopter group %1 stuck, waypoint reset",_x];};
#endif
/*
if ( (getPos _leader) distance2d (_group getVariable "patrolCenter") > 200) then
{
};
*/
};
}; };
}; };
} forEach blck_monitoredMissionAIGroups; } forEach blck_monitoredMissionAIGroups;
@ -111,7 +158,9 @@ _fn_monitorGroupWaypoints = {
//////// ////////
// Start of main function // Start of main function
//////// ////////
//diag_log format["_fnc_missionGroupMonitor: executing function at %1",diag_tickTime]; #ifdef blck_debugMode
uiSleep 0.1; if (blck_debugLevel > 2) then {diag_log format["_fnc_missionGroupMonitor: executing function at %1",diag_tickTime];};
#endif
[] call _fn_removeEmptyOrNullGroups; [] call _fn_removeEmptyOrNullGroups;
uiSleep 0.1;
[] call _fn_monitorGroupWaypoints; [] call _fn_monitorGroupWaypoints;

View File

@ -19,6 +19,8 @@ private["_group","_wp","_index","_pattern","_mode","_arc","_dis","_wpPos"];
_group = group _this; _group = group _this;
_group setVariable["timeStamp",diag_tickTime]; _group setVariable["timeStamp",diag_tickTime];
_group setcombatmode "YELLOW";
_group setBehaviour "COMBAT"
_wp = [_group, 0]; _wp = [_group, 0];
_pattern = _group getVariable["wpPattern",[]]; _pattern = _group getVariable["wpPattern",[]];
@ -26,8 +28,10 @@ _index = _group getVariable["wpIndex",0];
_index = _index + 1; _index = _index + 1;
_minDis = _group getVariable["minDis",0]; _minDis = _group getVariable["minDis",0];
_maxDis = _group getVariable["maxDis",0]; _maxDis = _group getVariable["maxDis",0];
_arc = (_group getVariable["arc",0]) + 70; dir = (_group getVariable["wpDir",0]) + _group getVariable["wpArc",360/5];
//diag_log format["_fnc_setNextWaypoint: -> _minDis = %1 | _maxDis = %2 | _arc = %3",_minDis,_maxDis,_arc]; _group setVariable["wpDir",_dir];
diag_log format["_fnc_setNextWaypoint: -> _minDis = %1 | _maxDis = %2 | _arc = %3",_minDis,_maxDis,_arc];
if (_index >= (count _pattern)) then if (_index >= (count _pattern)) then
{ {
_index = 0; _index = 0;
@ -47,25 +51,27 @@ _wpPos = waypointPosition _wp;
_wp setWaypointType _type; _wp setWaypointType _type;
_wp setWaypointName toLower _type; _wp setWaypointName toLower _type;
if (true /*_type isEqualTo toLower "move"*/) then if (_type isEqualTo (toLower "move")) then
{ {
_dis = (_minDis) + random( (_maxDis) - (_minDis) ); _dis = (_minDis) + random( (_maxDis) - (_minDis) );
if (toLower (_group getVariable["wpMode","random"]) isEqualTo "random") then if (_group getVariable["wpMode",""] isEqualTo "random") then
{ {
_arc = random(360); _dir = random(360)
} else { } else {
_group setVariable["arc",_arc]; _dir = _group getVariable["wpDir",0] + _group getVariable["wpArc",360/5];
}; };
_group setVariable["wpDir",_dir];
_oldPos = waypointPosition _wp; _oldPos = waypointPosition _wp;
_newPos = (_group getVariable ["patrolCenter",_wpPos]) getPos[_dis,_arc]; _newPos = (_group getVariable ["patrolCenter",_wpPos]) getPos[_dis,_arc];
_wp setWPPos _newPos; _wp setWPPos [_newPos select 0, _newPos select 1];
#ifdef blck_debugMode #ifdef blck_debugMode
diag_log format["_fnc_setNextWaypoint: -- > for group %5 | _dis = %1 | _arc = %2 _oldPos = %3 | _newPos = %4",_dis,_arc,_oldPos,_newPos,_group]; diag_log format["_fnc_setNextWaypoint: -- > for group %5 | _dis = %1 | _arc = %2 _oldPos = %3 | _newPos = %4",_dis,_arc,_oldPos,_newPos,_group];
#endif #endif
//_wp setWaypointTimeout [1.0,1.1,1.2]; _wp setWaypointTimeout [1.0,1.1,1.2];
_wp setWaypointTimeout [20,25,30]; //_wp setWaypointTimeout [20,25,30];
} else { } else {
_wp setWaypointTimeout [20,25,30]; _wp setWaypointTimeout [20,25,30];
_newPos = _wpPos; _newPos = _wpPos;

View File

@ -0,0 +1,93 @@
// Sets up waypoints for a specified group.
/*
for DBD Clan
By Ghostrider-DBD-
Copyright 2016
Last modified 4/29/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";
#ifdef blck_debugMode
diag_log "_fnc_setupWaypoints: blck_debugMode enabled";
#endif
private["_dir","_arc","_noWp","_newpos","_wpradius","_wp"];
params["_pos","_minDis","_maxDis","_group",["_mode","random"],["_wpPatrolMode","SAD"],["_soldierType","null"] ];
_wp = [_group, 0];
#ifdef blck_debugMode
diag_log format["_fnc_setupWaypoints (4/29/17): configuring waypoints for group %1: _mode = %2 | _wpPatrolMode = %3 _soldierType = %4",_group, _mode, _wpPatrolMode,_soldierType];
#endif
if (_soldierType isEqualTo "emplaced") then
{
_wp setWaypointType "SENTRY";
_wp setWPPos (getPos leader _group);
_wp setWaypointCompletionRadius 100;
_wp setWaypointBehaviour "COMBAT";
_wp setWaypointCombatMode "RED";
_wp setWaypointTimeout [1,1.1,1.2];
//_wp setWaypointTimeout [0.1,0.1100,0.1200];
_group setCurrentWaypoint _wp;
_group setVariable["soldierType",_soldierType];
#ifdef blck_debugMode
_wp setWaypointStatements ["true","this call blck_fnc_emplacedWeaponWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to an emplaced weapon Waypoint',group this];"];
#else
_wp setWaypointStatements ["true","this call blck_fnc_emplacedWeaponWaypoint;"];
#endif
if (blck_debugLevel > 1) then {diag_log format["_fnc_setupWaypoints: configuring weapoints for group %2 for emplaced weapon with _soldierType = %1",_soldierType,_group];};
};
if !(_soldierType isEqualTo "emplaced") then
{
_group setcombatmode "YELLOW";
_group setBehaviour "COMBAT";
_group setVariable["patrolCenter",_pos];
_group setVariable["minDis",_minDis];
_group setVariable["maxDis",_maxDis];
_group setVariable["timeStamp",diag_tickTime];
_group setVariable["wpRadius",30];
_group setVariable["wpMode",_mode];
_group setVariable["wpPatrolMode",_wpPatrolMode];
_group setVariable["wpDir",0];
_group setVariable["wpArc",_arc];
_group setVariable["soldierType",_soldierType];
_dir = 0;
_arc = 360/5;
_wpradius = 30;
_dis = (_minDis) + random( (_maxDis) - (_minDis) );
_newPos = _pos getPos[_dis,_dir];
_wp setWPPos [_newPos select 0, _newPos select 1];
_wp setWaypointCompletionRadius (_group getVariable["wpRadius",30]);
_wp setWaypointType "MOVE";
_wp setWaypointName "move";
_wp setWaypointBehaviour "COMBAT";
_wp setWaypointCombatMode "RED";
_wp setWaypointTimeout [1,1.1,1.2];
_group setCurrentWaypoint _wp;
#ifdef blck_debugMode
_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];"];
#else
_wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint;"];
#endif
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
_marker = createMarker [format["GroupMarker%1",_group],_newPos];
_group setVariable["wpMarker",_marker];
_marker setMarkerColor "ColorBlue";
_marker setMarkerText format["%1 %2",(_group getVariable["soldierType","null"]),_group];
_marker setMarkerType "mil_triangle";
//diag_log format["_fnc_setupWaypoints: configuring weapoints for group %2 mobile patrol with _soldierType = %1",_solderType,_group];
diag_log format["_fnc_setupWaypoints: soldier type for mobile _group %1 set to %2",_group, (_group getVariable["soldierType","null"])];
diag_log format["_fnc_setupWaypoints: all variables for the group have been set for group %1",_group];
diag_log format["_fnc_setupWaypoints:: -- >> wpMode %1 _dir %2 _dis 3",_group getVariable["wpMode","random"], _dir, _dis];
diag_log format["_fnc_setupWaypoints:: -- >> group to update is %1 and new position is %2",_group, _newPos];
diag_log format["_fnc_setupWaypoints:: -- >> Waypoint statements for group %1 have been configured as %2",_group, waypointStatements _wp];
diag_log format["_fnc_setupWaypoints:: -- >> Waypoint marker for group %1 have been configured as %2 with text set to %3",_group, _group getVariable "wpMarker", markerText (_group getVariable "wpMarker")];
};
#endif
};

View File

@ -3,7 +3,7 @@
for DBD Clan for DBD Clan
By Ghostrider-DBD- By Ghostrider-DBD-
Copyright 2016 Copyright 2016
Last modified 3/14/17 Last modified 4/25/17
-------------------------- --------------------------
License License
@ -16,30 +16,41 @@
private["_numbertospawn","_groupSpawned","_safepos","_weaponList","_useLauncher","_launcherType"]; private["_numbertospawn","_groupSpawned","_safepos","_weaponList","_useLauncher","_launcherType"];
params["_pos", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear] ]; params["_pos", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear],["_configureWaypoints",true] ];
if (blck_debugLevel > 2) then if (blck_debugLevel > 1) then
{ {
diag_log format["[blckeagls] _fnc_spawnGroup called parameters: _numai1 %1, _numbai2 %2, _skillLevel %3, _center %4",_numai1,_numai2,_skillLevel,_center]; diag_log format["[blckeagls] _fnc_spawnGroup called parameters: _numai1 %1, _numbai2 %2, _skillLevel %3, _center %4",_numai1,_numai2,_skillLevel,_center];
}; };
//Spawns correct number of AI //Spawns correct number of AI
if (_numai2 > _numai1) then { if (_numai2 > _numai1) then
{
_numbertospawn = floor( (random (_numai2 - _numai1) + _numai1 ) ); _numbertospawn = floor( (random (_numai2 - _numai1) + _numai1 ) );
} else { } else {
_numbertospawn = _numai2; _numbertospawn = _numai2;
}; };
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 2) then if (blck_debugLevel > 1) then
{ {
diag_log format["spawnGroup.sqf: _numbertospawn = %1",_numbertospawn]; diag_log format["spawnGroup.sqf: _numbertospawn = %1",_numbertospawn];
}; };
#endif #endif
_groupSpawned = createGroup blck_AI_Side; _groupSpawned = createGroup blck_AI_Side;
_groupSpawned setVariable["groupVehicle",objNull];
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["spawnGroup.sqf: _groupSpawned = %1",_groupSpawned];
};
#endif
if !(isNull _groupSpawned) then if !(isNull _groupSpawned) then
{ {
#ifdef blck_debugMode
if (blck_debugLevel > 1) then {diag_log format["_fnc_spawnGroup:: -- >> Group created = %1",_groupSpawned]}; if (blck_debugLevel > 1) then {diag_log format["_fnc_spawnGroup:: -- >> Group created = %1",_groupSpawned]};
_groupSpawned setcombatmode blck_combatMode; #endif
_groupSpawned setcombatmode "RED";
_groupSpawned setBehaviour "COMBAT";
_groupSpawned allowfleeing 0; _groupSpawned allowfleeing 0;
_groupSpawned setspeedmode "FULL"; _groupSpawned setspeedmode "FULL";
_groupSpawned setFormation blck_groupFormation; _groupSpawned setFormation blck_groupFormation;
@ -81,10 +92,14 @@ if !(isNull _groupSpawned) then
}; };
_groupSpawned selectLeader (units _groupSpawned select 0); _groupSpawned selectLeader (units _groupSpawned select 0);
// params["_pos","_minDis","_maxDis","_group",["_mode","random"],["_pattern",["MOVE","SAD"]]]; // params["_pos","_minDis","_maxDis","_group",["_mode","random"],["_pattern",["MOVE","SAD"]]];
[_pos,_minDist,_maxDist,_groupSpawned,"random",["MOVE","SAD"]] spawn blck_fnc_setupWaypoints; if (_configureWaypoints) then
{
[_pos,_minDist,_maxDist,_groupSpawned,"random","SAD","infantry"] spawn blck_fnc_setupWaypoints;
};
//[_pos,_minDist,_maxDist,_groupSpawned,"random","SENTRY"] spawn blck_fnc_setupWaypoints;
//diag_log format["_fnc_spawnGroup: blck_fnc_setupWaypoints called for group %1",_groupSpawned];
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 2) then if (blck_debugLevel > 1) then
{ {
diag_log format["fnc_spawnGroup:: Group spawned was %1 with units of %2",_groupSpawned, units _groupSpawned]; diag_log format["fnc_spawnGroup:: Group spawned was %1 with units of %2",_groupSpawned, units _groupSpawned];
}; };

View File

@ -6,7 +6,7 @@
for DBD Clan for DBD Clan
By Ghostrider-DBD- By Ghostrider-DBD-
Copyright 2016 Copyright 2016
Last Modified 1-24-17 Last Modified 4-11-17
-------------------------- --------------------------
License License
@ -25,20 +25,11 @@ _fn_deleteObjects = {
#endif #endif
{ {
if ((typeOf _x) isKindOf "LandVehicle") then #ifdef blck_debugMode
{
if !(_x getVariable["releasedToPlayers",false]) then
{
private _crew = crew _x;
{
[_x] call blck_fnc_deleteAI;
}forEach _crew;
};
_x setVariable["blck_DeleteAt",0]; // Schedule it to be deleted by fnc_vehicleMonitor immediately
} else {
if (blck_debugLevel > 1) then {diag_log format["_fnc_cleanUpObjects: -> deleting object %1",_x];}; if (blck_debugLevel > 1) then {diag_log format["_fnc_cleanUpObjects: -> deleting object %1",_x];};
#endif
deleteVehicle _x; deleteVehicle _x;
};
} forEach _objects; } forEach _objects;
}; };

View File

@ -16,11 +16,10 @@
*/ */
#include "\q\addons\custom_server\Configs\blck_defines.hpp"; #include "\q\addons\custom_server\Configs\blck_defines.hpp";
params["_mines","_objects","_crates","_blck_AllMissionAI","_endMsg","_blck_localMissionMarker","_coords","_mission",["_aborted",false],["_patrolVehicles",[]]]; params["_mines","_objects","_crates","_blck_AllMissionAI","_endMsg","_blck_localMissionMarker","_coords","_mission",["_aborted",false],["_vehicles",[]]];
//diag_log format["_fnc_endMission: _blck_localMissionMarker %1 | _coords %2 | _mission %3 | _aborted %4",_blck_localMissionMarker,_coords,_mission,_aborted];
//uisleep 0.1;
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 0) then { if (blck_debugLevel > 0) then {
diag_log format["_fnc_endMission: _blck_localMissionMarker %1 | _coords %2 | _mission %3 | _aborted %4",_blck_localMissionMarker,_coords,_mission,_aborted];
diag_log format["_fnc_endMission: _aborted = %1",_aborted]; diag_log format["_fnc_endMission: _aborted = %1",_aborted];
}; };
#endif #endif
@ -28,7 +27,7 @@
private["_cleanupAliveAITimer","_cleanupCompositionTimer"]; private["_cleanupAliveAITimer","_cleanupCompositionTimer"];
if (blck_useSignalEnd && !_aborted) then if (blck_useSignalEnd && !_aborted) then
{ {
diag_log format["**** Minor\SM1.sqf:: _crate = %1",_crates select 0]; //diag_log format["**** Minor\SM1.sqf:: _crate = %1",_crates select 0];
[_crates select 0] spawn blck_fnc_signalEnd; [_crates select 0] spawn blck_fnc_signalEnd;
#ifdef blck_debugMode #ifdef blck_debugMode
@ -67,22 +66,30 @@
// Using a variable attached to the crate rather than the global setting to be sure we do not fill a crate twice. // Using a variable attached to the crate rather than the global setting to be sure we do not fill a crate twice.
// the "lootLoaded" loaded should be set to true by the crate filler script so we can use that for our check. // the "lootLoaded" loaded should be set to true by the crate filler script so we can use that for our check.
{ {
diag_log format["_fnc_endMission: for crate %1 lootLoaded = %2",_x,_x getVariable["lootLoaded",false]]; //diag_log format["_fnc_endMission: for crate %1 lootLoaded = %2",_x,_x getVariable["lootLoaded",false]];
if !(_x getVariable["lootLoaded",false]) then if !(_x getVariable["lootLoaded",false]) then
{ {
// _crateLoot,_lootCounts are defined above and carry the loot table to be used and the number of items of each category to load // _crateLoot,_lootCounts are defined above and carry the loot table to be used and the number of items of each category to load
[_x,_crateLoot,_lootCounts] call blck_fnc_fillBoxes; [_x,_crateLoot,_lootCounts] call blck_fnc_fillBoxes;
}; };
}forEach _crates; }forEach _crates;
{
private ["_v","_posnVeh"];
_posnVeh = blck_monitoredVehicles find _x; // returns -1 if the vehicle is not in the array else returns 0-(count blck_monitoredVehicles -1)
if (_posnVeh >= 0) then
{
//diag_log format["_fnc_endMission: setting missionCompleted for vehicle %1 to %2",_x,diag_tickTime];
(blck_monitoredVehicles select _posnVeh) setVariable ["missionCompleted", diag_tickTime];
} else {
_x setVariable ["missionCompleted", diag_tickTime];
blck_monitoredVehicles pushback _x;
};
} forEach _vehicles;
[_mines] spawn blck_fnc_clearMines; [_mines] spawn blck_fnc_clearMines;
//diag_log format["_fnc_endMission: (23) _objects = %1",_objects]; //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]; //diag_log format["_fnc_endMission:: (26) _blck_AllMissionAI = %1",_blck_AllMissionAI];
{
_x setVariable["missionCompleted",diag_tickTime];
_x setVariable["cleanupTimer",_cleanupAliveAITimer];
} forEach _patrolVehicles;
[_blck_AllMissionAI, (_cleanupAliveAITimer)] spawn blck_fnc_addLiveAItoQue; [_blck_AllMissionAI, (_cleanupAliveAITimer)] spawn blck_fnc_addLiveAItoQue;
[_blck_localMissionMarker select 0] execVM "debug\deleteMarker.sqf"; [_blck_localMissionMarker select 0] execVM "debug\deleteMarker.sqf";
blck_ActiveMissionCoords = blck_ActiveMissionCoords - [ _coords]; blck_ActiveMissionCoords = blck_ActiveMissionCoords - [ _coords];

View File

@ -324,7 +324,7 @@ if (blck_useStatic && (_noEmplacedWeapons > 0)) then
if !(_abort) then if !(_abort) then
{ {
_objects append (_temp select 0); _objects append (_temp select 0);
//_blck_AllMissionAI append (_temp select 1); _blck_AllMissionAI append (_temp select 1);
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 0) then if (blck_debugLevel > 0) then
@ -352,7 +352,10 @@ if (_allowReinforcements) then
temp = []; temp = [];
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["[blckeagls] missionSpawner:: (268) calling in reinforcements: Current mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName]; diag_log format["[blckeagls] missionSpawner:: (268) calling in reinforcements: Current mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
};
#endif #endif
//params["_coords","_aiSkillsLevel","_weapons","_uniforms","_headgear"]; //params["_coords","_aiSkillsLevel","_weapons","_uniforms","_headgear"];

View File

@ -1,7 +1,7 @@
/* /*
[_missionEmplacedWeapons,_noEmplacedWeapons,_aiDifficultyLevel,_coords,_uniforms,_headGear] call blck_fnc_spawnEmplacedWeaponArray; [_missionEmplacedWeapons,_noEmplacedWeapons,_aiDifficultyLevel,_coords,_uniforms,_headGear] call blck_fnc_spawnEmplacedWeaponArray;
Last modified 3/20/17 Last modified 4/27/17
By Ghostrider-DbD- By Ghostrider-DbD-
-------------------------- --------------------------
@ -23,7 +23,7 @@ _pos = [];
_mode = "vector"; _mode = "vector";
#ifdef blck_debugMode #ifdef blck_debugMode
diag_log "_fnc_spawnEmplacedWeaponArray start"; //diag_log "_fnc_spawnEmplacedWeaponArray start";
#endif #endif
// Define _missionEmplacedWeapons if not already configured. // Define _missionEmplacedWeapons if not already configured.
@ -32,7 +32,10 @@ if (_missionEmplacedWeapons isEqualTo []) then
_mode = "world"; _mode = "world";
_missionEmplacedWeaponPositions = [_coords,_noEmplacedWeapons,35,50] call blck_fnc_findPositionsAlongARadius; _missionEmplacedWeaponPositions = [_coords,_noEmplacedWeapons,35,50] call blck_fnc_findPositionsAlongARadius;
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnEmplacedWeaponArray: creating random spawn locations: _missionEmplacedWeaponsPositions = %1", _missionEmplacedWeaponPositions]; diag_log format["_fnc_spawnEmplacedWeaponArray: creating random spawn locations: _missionEmplacedWeaponsPositions = %1", _missionEmplacedWeaponPositions];
};
#endif #endif
{ {
_static = selectRandom blck_staticWeapons; _static = selectRandom blck_staticWeapons;
@ -43,7 +46,10 @@ if (_missionEmplacedWeapons isEqualTo []) then
}; };
#ifdef blck_debugMode #ifdef blck_debugMode
diag_log format["_fnc_spawnEmplacedWeaponArray:: starting static weapon spawner with _missionEmplacedWeapons = %1", _missionEmplacedWeapons]; if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnEmplacedWeaponArray:: starting static weapon spawner with _missionEmplacedWeapons = %1", _missionEmplacedWeapons];
};
#endif #endif
{ {
@ -55,26 +61,35 @@ diag_log format["_fnc_spawnEmplacedWeaponArray:: starting static weapon spawner
}; };
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnEmplacedWeaponArray: _coords = %1 | offset = %2 | final _pos = 53",_coords,_x select 1, _pos]; diag_log format["_fnc_spawnEmplacedWeaponArray: _coords = %1 | offset = %2 | final _pos = 53",_coords,_x select 1, _pos];
};
#endif #endif
// params["_pos", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear] ]; // params["_pos", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear] ];
_empGroup = [(_x select 1),1,1,_aiDifficultyLevel,(_x select 1),1,2,_uniforms,_headGear] call blck_fnc_spawnGroup; _empGroup = [(_x select 1),1,1,_aiDifficultyLevel,(_x select 1),1,2,_uniforms,_headGear,false] call blck_fnc_spawnGroup;
while {(count (waypoints _empGroup)) > 1} do
{ _empGroup setcombatmode "RED";
deleteWaypoint ((waypoints _empGroup) select 0); _empGroup setBehaviour "COMBAT";
}; [(_x select 1),0.01,0.02,_empGroup,"random","SAD","emplaced"] spawn blck_fnc_setupWaypoints;
if (isNull _empGroup) exitWith {_abort = _true}; if (isNull _empGroup) exitWith {_abort = _true};
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnEmplacedWeaponArray:: typeName _empGroup = %1 and _empGroup = %2 and _x = %3",typeName _empGroup, _empGroup,_x]; diag_log format["_fnc_spawnEmplacedWeaponArray:: typeName _empGroup = %1 and _empGroup = %2 and _x = %3",typeName _empGroup, _empGroup,_x];
};
#endif #endif
// params["_vehType","_pos",["_clearInventory",true]]; // params["_vehType","_pos",["_clearInventory",true]];
_wep = [(_x select 0),[0,0,0],false] call blck_fnc_spawnVehicle; _wep = [(_x select 0),[0,0,0],false] call blck_fnc_spawnVehicle;
_empGroup setVariable["groupVehicle",_wep];
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnEmplacedWeaponArray (23) spawnVehicle returned value of _wep = %1",_wep]; diag_log format["_fnc_spawnEmplacedWeaponArray (23) spawnVehicle returned value of _wep = %1",_wep];
};
#endif #endif
_wep setVariable["DBD_vehType","emplaced"]; _wep setVariable["DBD_vehType","emplaced"];
@ -87,24 +102,22 @@ diag_log format["_fnc_spawnEmplacedWeaponArray:: starting static weapon spawner
_emplacedAI append _units; _emplacedAI append _units;
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnEmplacedWeaponArray:: position of emplaced weapon = %1 and targetd position is %2",getPos _wep, _pos]; diag_log format["_fnc_spawnEmplacedWeaponArray:: position of emplaced weapon = %1 and targetd position is %2",getPos _wep, _pos];
diag_log format["_fnc_spawnEmplacedWeaponArray:: _gunner = %1 and crew _wep = %2",_gunner, crew _wep]; diag_log format["_fnc_spawnEmplacedWeaponArray:: _gunner = %1 and crew _wep = %2",_gunner, crew _wep];
};
#endif #endif
_wp = [_empGroup, 0];
_wp setWaypointType "SENTRY";
_wp setWaypointName "sentry";
_wp setWaypointBehaviour "COMBAT";
_wp setWaypointCombatMode "RED";
_wp setWaypointTimeout [10000,11000,12000];
_wp = _empGroup addWaypoint [_pos, 25];
_wp setWaypointType "CYCLE";
} forEach _missionEmplacedWeapons; } forEach _missionEmplacedWeapons;
blck_missionVehicles append _emplacedWeps; blck_monitoredVehicles append _emplacedWeps;
_return = [_emplacedWeps,_emplacedAI,_abort]; _return = [_emplacedWeps,_emplacedAI,_abort];
#ifdef blck_debugMode #ifdef blck_debugMode
diag_log format["_fnc_spawnEmplacedWeaponArray:: returning with _return = _emplacedWeps = %1",_return]; if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnEmplacedWeaponArray:: returning with _return = _emplacedWeps = %1",_return];
};
#endif #endif
_return _return

View File

@ -47,7 +47,7 @@
}; };
#endif #endif
_newGroup = [_coords,_unitsToSpawn,_unitsToSpawn,_aiDifficultyLevel,_coords,3,18,_uniforms,_headGear] call blck_fnc_spawnGroup; _newGroup = [_coords,_unitsToSpawn,_unitsToSpawn,_aiDifficultyLevel,_coords,25,30,_uniforms,_headGear,true] call blck_fnc_spawnGroup;
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 2) then if (blck_debugLevel > 2) then
@ -63,7 +63,7 @@
else else
{ {
_newAI = units _newGroup; _newAI = units _newGroup;
blck_monitoredMissionAIGroups pushback _newGroup;
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 2) then if (blck_debugLevel > 2) then
{ {
@ -72,6 +72,7 @@
#endif #endif
_blck_AllMissionAI append _newAI; _blck_AllMissionAI append _newAI;
}; };
}; };
case 2: { case 2: {
@ -93,7 +94,7 @@
} else { } else {
_adjusttedGroupSize = _unitsPerGroup; _adjusttedGroupSize = _unitsPerGroup;
}; };
_newGroup = [_x,_adjusttedGroupSize,_adjusttedGroupSize,_aiDifficultyLevel,_coords,1,12,_uniforms,_headGear] call blck_fnc_spawnGroup; _newGroup = [_x,_adjusttedGroupSize,_adjusttedGroupSize,_aiDifficultyLevel,_coords,15,25,_uniforms,_headGear] call blck_fnc_spawnGroup;
if (isNull _newGroup) then if (isNull _newGroup) then
{ {
_abort = true; _abort = true;
@ -124,7 +125,7 @@
#endif #endif
_newGroup = [_coords,_unitsPerGroup + _ResidualUnits,_unitsPerGroup + _ResidualUnits,_aiDifficultyLevel,_coords,1,12,_uniforms,_headGear] call blck_fnc_spawnGroup; _newGroup = [_coords,_unitsPerGroup + _ResidualUnits,_unitsPerGroup + _ResidualUnits,_aiDifficultyLevel,_coords,10,15,_uniforms,_headGear] call blck_fnc_spawnGroup;
if (isNull _newGroup) then if (isNull _newGroup) then
{ {
_abort = true; _abort = true;

View File

@ -24,7 +24,12 @@ _objs = [];
{ {
_x params["_crateType","_crateOffset","_lootArray","_lootCounts"]; _x params["_crateType","_crateOffset","_lootArray","_lootCounts"];
//_pos = [(_coords select 0)+(_crateOffset select 0),(_coords select 1) + (_crateOffset select 1),(_coords select 2)+(_crateOffset select 2)]; // calculate the world coordinates //_pos = [(_coords select 0)+(_crateOffset select 0),(_coords select 1) + (_crateOffset select 1),(_coords select 2)+(_crateOffset select 2)]; // calculate the world coordinates
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnMissionCrates: _crateType = %1 | _crateOffset = %2 | _lootArray = %3 | _lootCounts = %4",_crateType,_crateOffset,_lootArray,_lootCounts]; diag_log format["_fnc_spawnMissionCrates: _crateType = %1 | _crateOffset = %2 | _lootArray = %3 | _lootCounts = %4",_crateType,_crateOffset,_lootArray,_lootCounts];
};
#endif
_pos = _coords vectorAdd _crateOffset; _pos = _coords vectorAdd _crateOffset;
_crate = [_pos,_crateType] call blck_fnc_spawnCrate; _crate = [_pos,_crateType] call blck_fnc_spawnCrate;
_objs pushback _crate; _objs pushback _crate;

View File

@ -37,6 +37,8 @@ _grpPilot allowFleeing 0;
private["_supplyHeli"]; private["_supplyHeli"];
//create helicopter and spawn it //create helicopter and spawn it
_supplyHeli = createVehicle [_chopperType, _spawnPos, [], 90, "FLY"]; _supplyHeli = createVehicle [_chopperType, _spawnPos, [], 90, "FLY"];
blck_monitoredVehicles pushback _supplyHeli;
[_supplyHeli] call blck_fnc_protectVehicle; [_supplyHeli] call blck_fnc_protectVehicle;
/* /*
if ([] call blck_fnc_getModType isEqualTo "Epoch") then if ([] call blck_fnc_getModType isEqualTo "Epoch") then
@ -68,15 +70,8 @@ diag_log format["_fnc_missionSpawner:: heli spawned and pilot added"];
#endif #endif
//set waypoint for helicopter //set waypoint for helicopter
private["_wpDestination"]; //params["_pos","_minDis","_maxDis","_group",["_mode","random"],["_wpPatrolMode","SAD"],["_soldierType","null"] ];
[_grpPilot, 0] setWPPos _coords; [_coords,25,40,_grpPilot,"random","SAD","helicpoter"] spawn blck_fnc_setupWaypoints;
[_grpPilot, 0] setWaypointType "MOVE";
[_grpPilot, 0] setWaypointSpeed "FULL";
[_grpPilot, 0] setWaypointBehaviour "CARELESS";
[_grpPilot, 0] setWaypointCompletionRadius 30;
[_grpPilot, 0] setWaypointStatements ["true","[this, 0] setWaypointName ""done"" ;"];
[_grpPilot,0] setWaypointTimeout [0.5,0.5,0.5];
_grpPilot setCurrentWaypoint [_grpPilot,0];
#ifdef blck_debugMode #ifdef blck_debugMode
diag_log format["_fnc_missionSpawner:: initial pilot waypoints set"]; diag_log format["_fnc_missionSpawner:: initial pilot waypoints set"];

View File

@ -33,15 +33,21 @@ _vehiclePatrolSpawns = [_coords,_noVehiclePatrols,45,60] call blck_fnc_findPosit
{ {
private ["_spawnPos"]; private ["_spawnPos"];
_spawnPos = _x; _spawnPos = _x;
_vehGroup = [_spawnPos,3,3,_aiDifficultyLevel,_coords,1,2,_uniforms,_headGear] call blck_fnc_spawnGroup; _vehGroup = [_spawnPos,3,3,_aiDifficultyLevel,_coords,1,2,_uniforms,_headGear,false] call blck_fnc_spawnGroup;
if (isNull _vehGroup) exitWith if (isNull _vehGroup) exitWith
{ {
_abort = true; _abort = true;
}; };
if !(isNull _vehGroup) then
{
blck_monitoredMissionAIGroups pushBack _vehGroup;
};
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 2) then if (blck_debugLevel > 1) then
{ {
diag_log format["_fnc_spawnMissionVehiclePatrols: group spawned = %1",_vehGroup];
diag_log format["_fnc_spawnMissionVehiclePatrols (40):: -> _missionType = %3 _vehGroup = %1 and units _vehGroup = %2",_vehGroup, units _vehGroup,_missionType]; diag_log format["_fnc_spawnMissionVehiclePatrols (40):: -> _missionType = %3 _vehGroup = %1 and units _vehGroup = %2",_vehGroup, units _vehGroup,_missionType];
}; };
#endif #endif
@ -49,19 +55,20 @@ _vehiclePatrolSpawns = [_coords,_noVehiclePatrols,45,60] call blck_fnc_findPosit
_randomVehicle = selectRandom blck_AIPatrolVehicles; _randomVehicle = selectRandom blck_AIPatrolVehicles;
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 2) then if (blck_debugLevel > 1) then
{ {
diag_log format["_fnc_spawnMissionVehiclePatrols: _randomVehicle = %1",_randomVehicle];
diag_log format["_fnc_spawnMissionVehiclePatrols:: -> randomly selected vehicle = %1",_randomVehicle]; diag_log format["_fnc_spawnMissionVehiclePatrols:: -> randomly selected vehicle = %1",_randomVehicle];
}; };
#endif #endif
//params["_center","_pos",["_vehType","I_G_Offroad_01_armed_F"],["_minDis",30],["_maxDis",45],["_group",grpNull]]; //params["_center","_pos",["_vehType","I_G_Offroad_01_armed_F"],["_minDis",30],["_maxDis",45],["_group",grpNull]];
_patrolVehicle = [_coords,_spawnPos,_randomVehicle,30,45,_vehGroup] call blck_fnc_spawnVehiclePatrol; _patrolVehicle = [_coords,_spawnPos,_randomVehicle,35,45,_vehGroup] call blck_fnc_spawnVehiclePatrol;
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 2) then if (blck_debugLevel > 1) then
{ {
diag_log format["_fnc_spawnMissionVehiclePatrols:: - > patrol vehicle spawned was %1",_patrolVehicle]; diag_log format["_fnc_spawnMissionVehiclePatrols (65):: - > patrol vehicle spawned was %1",_patrolVehicle];
}; };
#endif #endif
@ -72,7 +79,7 @@ _vehiclePatrolSpawns = [_coords,_noVehiclePatrols,45,60] call blck_fnc_findPosit
}; };
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 2) then if (blck_debugLevel > 1) then
{ {
diag_log format["_fnc_spawnMissionVehiclePatrols:: -- > _vehicles updated to %1",_vehicles]; diag_log format["_fnc_spawnMissionVehiclePatrols:: -- > _vehicles updated to %1",_vehicles];
}; };
@ -80,7 +87,7 @@ _vehiclePatrolSpawns = [_coords,_noVehiclePatrols,45,60] call blck_fnc_findPosit
} forEach _vehiclePatrolSpawns; } forEach _vehiclePatrolSpawns;
blck_missionVehicles append _vehicles; blck_monitoredVehicles append _vehicles;
_return = [_vehicles, _missionAI, _abort]; _return = [_vehicles, _missionAI, _abort];
_return _return

View File

@ -2,7 +2,7 @@
for DBD Clan for DBD Clan
By Ghostrider-DBD- By Ghostrider-DBD-
Copyright 2016 Copyright 2016
Last modified 3/20/17 Last modified 4/29/17
checks the status of each entry in checks the status of each entry in
/* /*
By Ghostrider-DbD- By Ghostrider-DbD-
@ -39,8 +39,12 @@ _readyToSpawnQue = [];
_readyToSpawnQue pushback _x; _readyToSpawnQue pushback _x;
}; };
} forEach blck_pendingMissions; } forEach blck_pendingMissions;
diag_log format["_fnc_spawnPendingMissions:: --- >> _readyToSpawnQue = %1",_readyToSpawnQue]; #ifdef blck_debugMode
if (blck_debugLevel > 0) then
{
diag_log format["_fnc_spawnPendingMissions:: --- >> _readyToSpawnQue = %1",_readyToSpawnQue];
};
#endif
if (count _readyToSpawnQue > 0) then if (count _readyToSpawnQue > 0) then
{ {
_missionToSpawn = selectRandom _readyToSpawnQue; _missionToSpawn = selectRandom _readyToSpawnQue;

View File

@ -1,16 +1,7 @@
/* /*
Pulled from Arma Pulled from Arma
version of 11/9/16 version of 11/9/16
Modified by Ghostrider-DbD-
--------------------------
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";
params["_center","_azi","_objs","_setVector"]; params["_center","_azi","_objs","_setVector"];

View File

@ -27,17 +27,24 @@ _sunrise = _arr select 0;
_sunset = _arr select 1; _sunset = _arr select 1;
_time = dayTime; _time = dayTime;
diag_log format["_fnc_Time:: -- > _sunrise = %1 | _sunset = %2 | _time = %3",_sunrise,_sunset,_time];
// blck_debugMode3 // blck_debugMode3
#ifdef blck_debugMode #ifdef blck_debugMode
diag_log "fnc_Time:: Debug settings ON"; if (blck_debugLevel > 2) then
{
diag_log "fnc_Time:: Debug settings ON";
diag_log format["_fnc_Time:: -- > _sunrise = %1 | _sunset = %2 | _time = %3",_sunrise,_sunset,_time];
};
#endif #endif
// Night // Night
if (_time > (_sunset + 0.5) || _time < (_sunrise - 0.5)) exitWith { if (_time > (_sunset + 0.5) || _time < (_sunrise - 0.5)) exitWith {
setTimeMultiplier blck_timeAccelerationNight; setTimeMultiplier blck_timeAccelerationNight;
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 2) then
{
diag_log format["NIGHT TIMGE ADJUSTMENT:: time accel updated to %1; time of day = %2",timeMultiplier,dayTime]; diag_log format["NIGHT TIMGE ADJUSTMENT:: time accel updated to %1; time of day = %2",timeMultiplier,dayTime];
};
#endif #endif
}; };
@ -45,14 +52,21 @@ if (_time > (_sunset + 0.5) || _time < (_sunrise - 0.5)) exitWith {
if (_time > (_sunrise + 0.5) && _time < (_sunset - 0.5)) exitWith { if (_time > (_sunrise + 0.5) && _time < (_sunset - 0.5)) exitWith {
setTimeMultiplier blck_timeAccelerationDay; setTimeMultiplier blck_timeAccelerationDay;
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 2) then
{
diag_log format["DAYTIME ADJUSTMENT:: time accel updated to %1; time of day = %2",timeMultiplier,dayTime]; diag_log format["DAYTIME ADJUSTMENT:: time accel updated to %1; time of day = %2",timeMultiplier,dayTime];
};
#endif #endif
}; };
// default // default
setTimeMultiplier blck_timeAccelerationDusk; setTimeMultiplier blck_timeAccelerationDusk;
#ifdef blck_debugMode #ifdef blck_debugMode
diag_log format["DUSK ADJUSTMENT:: time accel updated to %1; time of day = %2",timeMultiplier,dayTime]; if (blck_debugLevel > 2) then
{
diag_log format["DUSK ADJUSTMENT:: time accel updated to %1; time of day = %2",timeMultiplier,dayTime];
};
#endif #endif

View File

@ -17,7 +17,14 @@ private ["_unit","_instigator","_group","_wp"];
//diag_log format["_EH_AIHit::-->> _this = %1",_this]; //diag_log format["_EH_AIHit::-->> _this = %1",_this];
_unit = _this select 0 select 0; _unit = _this select 0 select 0;
_instigator = _this select 0 select 3; _instigator = _this select 0 select 3;
diag_log format["EH_AIHit:: _units = %1 and _instigator = %2 units damage is %3",_unit,_instigator, damage _unit];
#ifdef blck_debugMode
if (blck_debugLevel ? 1) then
{
diag_log format["EH_AIHit:: _units = %1 and _instigator = %2 units damage is %3",_unit,_instigator, damage _unit];
};
#endif
if (!(alive _unit)) exitWith {}; if (!(alive _unit)) exitWith {};
if (!(isPlayer _instigator)) exitWith {}; if (!(isPlayer _instigator)) exitWith {};
[_unit,_instigator] call blck_fnc_alertNearbyLeader; [_unit,_instigator] call blck_fnc_alertNearbyLeader;
@ -33,9 +40,11 @@ if ((damage _unit) > 0.1 ) then
{ {
//diag_log format["_EH_AIHit::-->> Healing unit %1",_unit]; //diag_log format["_EH_AIHit::-->> Healing unit %1",_unit];
_unit setVariable["hasHealed",true,true]; _unit setVariable["hasHealed",true,true];
//_unit addMagazine "SmokeShellOrange"; _unit addMagazine "SmokeShellOrange";
_unit fire ["SmokeShellMuzzle","SmokeShellMuzzle","SmokeShellRed"]; _unit fire "SmokeShellMuzzle";
_unit addItem "FirstAidKit"; _unit addItem "FAK";
_unit action ["HealSoldierSelf", soldier1]; _unit action ["HealSoldierSelf", _unit];
_unit setDamage 0;
_unit removeItem "FAK";
}; };

View File

@ -31,10 +31,12 @@
//_unit = _this select 0; //_unit = _this select 0;
//_mag = _this select 3 select 0; //_mag = _this select 3 select 0;
(_this select 0) addMagazine (_this select 3 select 0); (_this select 0) addMagazine (_this select 3 select 0);
#ifdef blck_debugMode
if (blck_debugON) then { if (blck_debugON) then {
//diag_log format["_EH_unitWeaponReloaded:: unit %1 reloaded weapon %2 with magazine %3",_this select 0, (_this select 3 select 0)]; //diag_log format["_EH_unitWeaponReloaded:: unit %1 reloaded weapon %2 with magazine %3",_this select 0, (_this select 3 select 0)];
//diag_log format["_EH_unitWeaponReloaded:: unit %1 currently has the following magazines 2",_this select 0,magazines (_this select 0)]; //diag_log format["_EH_unitWeaponReloaded:: unit %1 currently has the following magazines 2",_this select 0,magazines (_this select 0)];
}; };
#endif
//if (blck_debugLevel > 2) then (diag_log format["_EH_unitWeaponReloaded:: one magazine of type %1 added to inventory of unit %2",_mag,_unit]; //if (blck_debugLevel > 2) then (diag_log format["_EH_unitWeaponReloaded:: one magazine of type %1 added to inventory of unit %2",_mag,_unit];

View File

@ -47,13 +47,12 @@ for "_i" from 1 to (count blck_liveMissionAI) do
diag_log format["_fnc_cleanupAliveAI:: deleting unit %1",_x]; diag_log format["_fnc_cleanupAliveAI:: deleting unit %1",_x];
diag_log format["_fnc_cleanupAliveAI:: vehicle _x = %1",vehicle _x]; diag_log format["_fnc_cleanupAliveAI:: vehicle _x = %1",vehicle _x];
diag_log format["_fnc_cleanupAliveAI:: objectParent _x = %1",objectParent _x]; diag_log format["_fnc_cleanupAliveAI:: objectParent _x = %1",objectParent _x];
/*
if ((alive _x) && !(isNull objectParent _x)) then // mark the vehicle for deletion if ((alive _x) && !(isNull objectParent _x)) then // mark the vehicle for deletion
{ {
(vehicle _x) setVariable["blck_DeleteAt",diag_tickTime]; diag_log format["_fnc_cleanupAliveAI: deleteing objectParent %1 [%3] for unit %2",objectParent _x, _x, typeName (objectParent _x), typeOf (objectParent _x)];
diag_log format["_fnc_cleanupAliveAI:: deleteAt for vehicle _x = %1",(vehicle _x) getVariable["blck_DeleteAt",0]]; [objectParent _x] call blck_fn_deleteAIvehicle;
}; };
*/
[_x] call blck_fnc_deleteAI; [_x] call blck_fnc_deleteAI;
}forEach (_units select 0); }forEach (_units select 0);
uiSleep 0.1; uiSleep 0.1;

View File

@ -12,7 +12,7 @@
#include "\q\addons\custom_server\Configs\blck_defines.hpp"; #include "\q\addons\custom_server\Configs\blck_defines.hpp";
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 1) then {diag_log format["fnc_cleanupDeadAI called at time %1",diag_tickTime];}; if (blck_debugLevel > 2) then {diag_log format["fnc_cleanupDeadAI called at time %1",diag_tickTime];};
#endif #endif
private["_aiList","_ai"]; private["_aiList","_ai"];

View File

@ -17,9 +17,10 @@ _launcher = _unit getVariable ["Launcher",""];
_legal = true; _legal = true;
_fn_targetVehicle = { // force AI to fire on the vehicle with launchers if equiped _fn_targetVehicle = { // force AI to fire on the vehicle with launchers if equiped
params["_vk","_unit"]; params["_unit","_vk"];
private
{ {
if (((position _x) distance (position _unit)) <= 350) then if ( ( (getPos _vk) distance2d (getPos _x) ) < 500 ) then
{ {
_x reveal [_vk, 4]; _x reveal [_vk, 4];
_x dowatch _vk; _x dowatch _vk;
@ -33,7 +34,7 @@ _fn_targetVehicle = { // force AI to fire on the vehicle with launchers if equi
_x doFire _vk; _x doFire _vk;
}; };
}; };
} forEach allUnits; } forEach (call blck_fnc_allPlayers);
}; };
_fn_applyVehicleDamage = { // apply a bit of damage _fn_applyVehicleDamage = { // apply a bit of damage
@ -60,10 +61,12 @@ if (typeOf _killer != typeOf (vehicle _killer)) then // AI was killed by a vehi
if(_killer == driver(vehicle _killer))then{ // The AI was runover if(_killer == driver(vehicle _killer))then{ // The AI was runover
if(blck_RunGear) then { // If we are supposed to delete gear from AI that were run over then lets do it. if(blck_RunGear) then { // If we are supposed to delete gear from AI that were run over then lets do it.
[_unit] call _fn_deleteAIGear; [_unit] call _fn_deleteAIGear;
if (blck_debugON) then #ifdef blck_debugMode
if (blck_debugLevel > 2) then
{ {
diag_log format["<<--->> Unit %1 was run over by %2",_unit,_killer]; diag_log format["<<--->> Unit %1 was run over by %2",_unit,_killer];
}; };
#endif
}; };
if (blck_VK_RunoverDamage) then {//apply vehicle damage if (blck_VK_RunoverDamage) then {//apply vehicle damage
[vehicle _killer] call _fn_applyVehicleDamage; [vehicle _killer] call _fn_applyVehicleDamage;
@ -76,11 +79,12 @@ if (typeOf _killer != typeOf (vehicle _killer)) then // AI was killed by a vehi
}; };
if ( blck_VK_GunnerDamage &&((typeOf vehicle _killer) in blck_forbidenVehicles or (currentWeapon _killer) in blck_forbidenVehicleGuns) ) then { if ( blck_VK_GunnerDamage &&((typeOf vehicle _killer) in blck_forbidenVehicles or (currentWeapon _killer) in blck_forbidenVehicleGuns) ) then {
if (blck_debugON) then #ifdef blck_debugMode
if (blck_debugLevel > 2) then
{ {
diag_log format["!!---!! Unit was killed by a forbidden vehicle or gun",_unit]; diag_log format["!!---!! Unit was killed by a forbidden vehicle or gun",_unit];
}; };
#endif
if (blck_VK_Gear) then {[_unit] call _fn_deleteAIGear;}; if (blck_VK_Gear) then {[_unit] call _fn_deleteAIGear;};
[_unit, vehicle _killer] call _fn_targetVehicle; [_unit, vehicle _killer] call _fn_targetVehicle;
[vehicle _killer] call _fn_applyVehicleDamage; [vehicle _killer] call _fn_applyVehicleDamage;

View File

@ -37,9 +37,9 @@ if (_veh getVariable["DBD_vehType","none"] isEqualTo "emplaced") then // Deal w
} forEach ["HitLFWheel","HitLF2Wheel","HitRFWheel","HitRF2Wheel","HitEngine","HitLBWheel","HitLMWheel","HitRBWheel","HitRMWheel","HitTurret","HitGun","HitTurret","HitGun","HitTurret","HitGun","HitTurret","HitGun"]; } 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]; _veh setVariable["blck_DeleteAt",diag_tickTime + 60];
} else { } else {
if (blck_debugLevel > 0) then {diag_log format["_fnc_vehicleMonitor:: case of release vehicle = %1 to player with blck_missionVehicles = %2",_veh, blck_missionVehicles];}; if (blck_debugLevel > 0) then {diag_log format["_fnc_vehicleMonitor:: case of release vehicle = %1 to player with blck_monitoredVehicles = %2",_veh, blck_monitoredVehicles];};
blck_missionVehicles = blck_missionVehicles - [_veh]; blck_monitoredVehicles = blck_monitoredVehicles - [_veh];
if (blck_debugLevel > 0) then {diag_log format["_fnc_vehicleMonitor:: blck_missionVehicles updated to %1", blck_missionVehicles];}; if (blck_debugLevel > 0) then {diag_log format["_fnc_vehicleMonitor:: blck_monitoredVehicles updated to %1", blck_monitoredVehicles];};
[_veh] call blck_fnc_releaseVehicleToPlayers; [_veh] call blck_fnc_releaseVehicleToPlayers;
}; };
}; };

View File

@ -15,8 +15,8 @@
#include "\q\addons\custom_server\Configs\blck_defines.hpp"; #include "\q\addons\custom_server\Configs\blck_defines.hpp";
params["_v"]; params["_v"];
//diag_log format["_fnc_releastVehicletoPlayers.sqf: removing vehicle %1 from ",_v,blck_missionVehicles]; //diag_log format["_fnc_releastVehicletoPlayers.sqf: removing vehicle %1 from ",_v,blck_monitoredVehicles];
//blck_missionVehicles = blck_missionVehicles - [_v]; //blck_monitoredVehicles = blck_monitoredVehicles - [_v];
_v removeAllEventHandlers "GetIn"; _v removeAllEventHandlers "GetIn";
_v removeAllEventHandlers "GetOut"; _v removeAllEventHandlers "GetOut";
_v removeAllEventHandlers "Fired"; _v removeAllEventHandlers "Fired";

View File

@ -3,15 +3,7 @@
Inspiration: blckeagls / A3EAI / VEMF / IgiLoad / SDROP Inspiration: blckeagls / A3EAI / VEMF / IgiLoad / SDROP
License: Attribution-NonCommercial-ShareAlike 4.0 International License: Attribution-NonCommercial-ShareAlike 4.0 International
Last Modified 1/23/17 Last Modified 1/23/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";
params["_grpPilot"]; params["_grpPilot"];
private["_heli","_pilot"]; private["_heli","_pilot"];
_pilot = (units _grpPilot) select 0; _pilot = (units _grpPilot) select 0;

View File

@ -80,6 +80,7 @@ if (!(isNull _grpPilot) && !(isNull _grpParatroops)) then
#endif #endif
_patrolHeli = createVehicle [_chopperType, _coords, [], 90, "FLY"]; _patrolHeli = createVehicle [_chopperType, _coords, [], 90, "FLY"];
_grpPilot setVariable["groupVehicle",_patrolHeli];
[_patrolHeli] call blck_fnc_protectVehicle; [_patrolHeli] call blck_fnc_protectVehicle;
_patrolHeli setFuel 1; _patrolHeli setFuel 1;
_patrolHeli engineOn true; _patrolHeli engineOn true;
@ -163,96 +164,9 @@ if (!(isNull _grpPilot) && !(isNull _grpParatroops)) then
}; };
//set waypoint for helicopter //set waypoint for helicopter
private["_dir","_arc","_noWp","_wpradius","_newPos","_wp","_pos"]; [_coords,30,35,_grpPilot,"random","SENTRY"] spawn blck_fnc_setupWaypoints;
//set waypoint for helicopter
_dir = 0;
_arc = 30;
_noWp = 1;
_wpradius = 30;
_wp = [_grpPilot, 0];
_pos = getWPPos _wp;
_newPos = _pos getPos [(_minDis+(random (_maxDis - _minDis))), _dir];
#ifdef wpModeMove
_wp setWaypointType "MOVE";
_wp setWaypointName "move";
_wp setWaypointTimeout [1,1.1,1.2];
_wp setWaypointStatements ["true","this call blck_fnc_setNextWaypoint;diag_log format['====Updating waypoint to for group %1',group this];"];
#else
_wp setWaypointType "SAD";
_wp setWaypointName "sad";
_wp setWaypointTimeout [20,25,30];
_wp setWaypointStatements ["true","this call blck_fnc_setNextWaypoint;diag_log format['====Updating waypointfor group %1',group this];"];
#endif
_wp setWaypointBehaviour "COMBAT";
_wp setWaypointCombatMode "RED";
//_wp setWaypointTimeout [1,1.1,1.2];
_grpPilot setCurrentWaypoint _wp;
// params["_pos","_minDis","_maxDis","_group",["_mode","random"],["_pattern",["MOVE","SAD"]]];
//[_coords,2,10,_grpPilot,"random",["SENTRY"]] call blck_fnc_setupWaypoints;
/*
_grpPilot setVariable["patrolCenter",_coords];
_grpPilot setVariable["minDis",10];
_grpPilot setVariable["maxDis",25];
_grpPilot setVariable["timeStamp",diag_tickTime];
_grpPilot setVariable["arc",0];
_grpPilot setVariable["wpRadius",30];
//_grpPilot setVariable["wpMode",_mode];
_dir = 0;
_arc = 30;
_noWp = 1;
_wpradius = 30;
_newPos = _pos getPos [(_minDis+(random (_maxDis - _minDis))), _dir];
_wp = [_grpPilot, 0];
#ifdef wpModeMove
_wp setWaypointType "MOVE";
_wp setWaypointName "move";
_wp setWaypointTimeout [1,1.1,1.2];
_wp setWaypointStatements ["true","this call blck_fnc_changeToSADWaypoint;diag_log format['====Updating waypoint to SAD for group %1',group this];"];
#else
_wp setWaypointType "SAD";
_wp setWaypointName "sad";
_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 blck_groupBehavior;
_wp setWaypointCombatMode blck_combatMode;
_grpPilot setCurrentWaypoint _wp;
*/
/*
for "_i" from 1 to 5 do
{
_pos = _coords getPos [15 + random (15), random(360)];
if (_i == 1) then
{
_wp = [_grpPilot, 0];
_wp setWPPos _pos;
} else {
_wp = _grpPilot addWaypoint [_pos, 25];
};
_wp setWaypointType "SAD";
_wp setWaypointSpeed "NORMAL";
_wp setWaypointBehaviour "AWARE";
//[_grpPilot, 0] setWaypointStatements ["true","[group this, 0] setCurrentWaypoint [group this,0];"];
_wp setWaypointTimeout [20,30,40];
_wp = _grpPilot addWaypoint [_coords,25];
_wp setWaypointType "MOVE";
_wp setWaypointBehaviour "AWARE";
_wp setWaypointTimeout [1, 1.1, 1.2];
};
_wp = _grpPilot addWaypoint [_coords,25];
_wp setWaypointType "CYCLE";
_grpPilot setCurrentWaypoint [_grpPilot,0];
*/
blck_monitoredMissionAIGroups pushBack _grpPilot;
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 1) then if (blck_debugLevel > 1) then
{ {
@ -262,7 +176,7 @@ if (!(isNull _grpPilot) && !(isNull _grpParatroops)) then
diag_log "_fnc_spawnMissionHeli:-> spawning crew monitoring loop"; diag_log "_fnc_spawnMissionHeli:-> spawning crew monitoring loop";
while {!isNull _patrolHeli} do while {!isNull _patrolHeli} do
{ {
uiSleep 10; uiSleep 120;
diag_log format["_fnc_spawnMissionHeli:-> heli %1 has %2 crew alive",_patrolHeli, {alive _x} count crew _patrolHeli]; diag_log format["_fnc_spawnMissionHeli:-> heli %1 has %2 crew alive",_patrolHeli, {alive _x} count crew _patrolHeli];
diag_log format["_fnc_spawnMissionHeli:-> heli %1 fullCrew = %2",_patrolHeli, fullCrew _patrolHeli]; diag_log format["_fnc_spawnMissionHeli:-> heli %1 fullCrew = %2",_patrolHeli, fullCrew _patrolHeli];
}; };

View File

@ -91,8 +91,9 @@ if ( (random(1) < _chanceParatroops)) then
_aborted = [_coords,_grpParatroops,_noPara,_skillAI,_weapons,_uniforms,_headGear,_heli] call blck_fnc_spawnParaUnits; _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]; //diag_log format["_fnc_spawnMissionParatroops: blck_fnc_spawnParaUnits returned a value of %1",_aborted];
}; };
#ifdef blck_debugMode
diag_log format["_fnc_spawnMissionParatroops: _aborted = %1",_aborted]; diag_log format["_fnc_spawnMissionParatroops: _aborted = %1",_aborted];
#endif
if (_aborted) then if (_aborted) then
{ {
_return = [[],true]; _return = [[],true];

View File

@ -30,6 +30,7 @@ if (isNull _paraGroup) then
{ {
_aborted = true; _aborted = true;
} else { } else {
_paraGroup setVariable["groupVehicle",objNull];
_launcherType = "none"; _launcherType = "none";
private ["_arc","_spawnPos"]; private ["_arc","_spawnPos"];
_arc = 45; _arc = 45;
@ -47,15 +48,26 @@ if (isNull _paraGroup) then
_unit moveInDriver _chute; _unit moveInDriver _chute;
_unit allowDamage true; _unit allowDamage true;
_dir = _dir + _arc; _dir = _dir + _arc;
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnParaUnits:: spawned unit %1, at location %2 and vehicle _unit %1",_unit,getPos _unit, vehicle _unit]; diag_log format["_fnc_spawnParaUnits:: spawned unit %1, at location %2 and vehicle _unit %1",_unit,getPos _unit, vehicle _unit];
};
#endif
uiSleep 2; uiSleep 2;
}; };
_paraGroup selectLeader ((units _paraGroup) select 0); _paraGroup selectLeader ((units _paraGroup) select 0);
//params["_pos","_minDis","_maxDis","_group"]; //params["_pos","_minDis","_maxDis","_group"];
[_missionPos,10,20,_paraGroup] call blck_fnc_setupWaypoints; // [_pos,_minDist,_maxDist,_groupSpawned,"random","SAD"] spawn blck_fnc_setupWaypoints;
[_missionPos,20,30,_paraGroup,"random","SAD","paraUnits"] call blck_fnc_setupWaypoints;
blck_monitoredMissionAIGroups pushback _paraGroup;
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log "_fnc_spawnParaUnits (44): All Units spawned"; diag_log "_fnc_spawnParaUnits (44): All Units spawned";
};
#endif #endif
}; };

View File

@ -21,34 +21,43 @@ _uniforms = _this select 3;
_headgear = _this select 4; _headgear = _this select 4;
private["_chanceHeliPatrol","_return","_temp","_missionHelis"]; private["_chanceHeliPatrol","_return","_temp","_missionHelis"];
#ifdef blck_debugMode
if (blck_debugON) then {diag_log format["_fnc_spawnMissionReinforcements (25): Script Starting with _aiSkillsLevel = %1",_aiSkillsLevel]}; if (blck_debugLevel > 0) then {diag_log format["_fnc_spawnMissionReinforcements (25): Script Starting with _aiSkillsLevel = %1",_aiSkillsLevel]};
#endif
_aiSkillsLevel = toLower _aiSkillsLevel; _aiSkillsLevel = toLower _aiSkillsLevel;
if (_aiSkillsLevel isEqualTo "blue") then { if (_aiSkillsLevel isEqualTo "blue") then {
if (blck_debugON) then {diag_log "_fnc_spawnMissionReinforcements (29): BLUE difficulty settings applied";}; #ifdef blck_debugMode
if (blck_debugLevel > 0) then {diag_log "_fnc_spawnMissionReinforcements (29): BLUE difficulty settings applied";};
#endif
_chanceHeliPatrol = blck_chanceHeliPatrolBlue; _chanceHeliPatrol = blck_chanceHeliPatrolBlue;
_missionHelis = blck_patrolHelisBlue; _missionHelis = blck_patrolHelisBlue;
}; };
if (_aiSkillsLevel isEqualTo "green") then { if (_aiSkillsLevel isEqualTo "green") then {
if (blck_debugON) then {diag_log "_fnc_spawnMissionReinforcements (34): GREEN difficulty settings applied";}; #ifdef blck_debugMode
if (blck_debugLevel > 0) then {diag_log "_fnc_spawnMissionReinforcements (34): GREEN difficulty settings applied";};
#endif
_chanceHeliPatrol = blck_chanceHeliPatrolGreen; _chanceHeliPatrol = blck_chanceHeliPatrolGreen;
_missionHelis = blck_patrolHelisGreen; _missionHelis = blck_patrolHelisGreen;
}; };
if (_aiSkillsLevel isEqualTo "orange") then { if (_aiSkillsLevel isEqualTo "orange") then {
if (blck_debugON) then {diag_log "_fnc_spawnMissionReinforcements (39): ORANGE difficulty settings applied";}; #ifdef blck_debugMode
if (blck_debugLevel > 0) then {diag_log "_fnc_spawnMissionReinforcements (39): ORANGE difficulty settings applied";};
#endif
_chanceHeliPatrol = blck_chanceHeliPatrolOrange; _chanceHeliPatrol = blck_chanceHeliPatrolOrange;
_missionHelis = blck_patrolHelisOrange; _missionHelis = blck_patrolHelisOrange;
}; };
if (_aiSkillsLevel isEqualTo "red") then if (_aiSkillsLevel isEqualTo "red") then
{ {
if (blck_debugON) then {diag_log "_fnc_spawnMissionReinforcements (46): RED difficulty settings applied";}; #ifdef blck_debugMode
if (blck_debugLevel > 0) then {diag_log "_fnc_spawnMissionReinforcements (46): RED difficulty settings applied";};
#endif
_chanceHeliPatrol = blck_chanceHeliPatrolRed; _chanceHeliPatrol = blck_chanceHeliPatrolRed;
_missionHelis = blck_patrolHelisRed; _missionHelis = blck_patrolHelisRed;
}; };
#ifdef blck_debugMode
if (blck_debugLevel > 1) then {diag_log format["_fnc_spawnMissionReinforcements (50): Variables defined: _chanceHeliPatrol %1 | _missionHelis %2",_chanceHeliPatrol,_missionHelis];}; if (blck_debugLevel > 1) then {diag_log format["_fnc_spawnMissionReinforcements (50): Variables defined: _chanceHeliPatrol %1 | _missionHelis %2",_chanceHeliPatrol,_missionHelis];};
#endif
if ( (_chanceHeliPatrol > 0) && (random (1) < _chanceHeliPatrol) ) then // if helipatrols are 'enabled' then paratroops will only drop if a heli spawns. if ( (_chanceHeliPatrol > 0) && (random (1) < _chanceHeliPatrol) ) then // if helipatrols are 'enabled' then paratroops will only drop if a heli spawns.
// The chance that they drop is linked to the value for them for that difficulty _aiSkillsLevel // The chance that they drop is linked to the value for them for that difficulty _aiSkillsLevel
//see _fnc_spannMissionParatroops for how this is handled. //see _fnc_spannMissionParatroops for how this is handled.

View File

@ -16,20 +16,20 @@ private["_veh","_modType"];
params["_vehType","_pos",["_clearInventory",true]]; params["_vehType","_pos",["_clearInventory",true]];
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 2) then {diag_log format["spawnVehicle.sqf: _vehType = %1 | _pos = %2",_vehType,_pos];}; if (blck_debugLevel > 1) then {diag_log format["spawnVehicle.sqf: _vehType = %1 | _pos = %2",_vehType,_pos];};
#endif #endif
_veh = createVehicle[_vehType, _pos, [], 0, "NONE"]; _veh = createVehicle[_vehType, _pos, [], 0, "NONE"];
[_veh] call blck_fnc_protectVehicle; [_veh] call blck_fnc_protectVehicle;
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 2) then {diag_log format["spawnVehicle.sqf:: vehicle spawned is %1",_veh];}; if (blck_debugLevel > 1) then {diag_log format["spawnVehicle.sqf:: vehicle spawned is %1",_veh];};
#endif #endif
// params["_veh",["_clearInventory",true]]; // params["_veh",["_clearInventory",true]];
[_veh,_clearInventory] call blck_fnc_configureMissionVehicle; [_veh,_clearInventory] call blck_fnc_configureMissionVehicle;
#ifdef blck_debugMode #ifdef blck_debugMode
diag_log format["spawnVehicle:: returning parameter _veh = %1",_veh]; if (blck_debugLevel > 1) then {diag_log format["spawnVehicle:: returning parameter _veh = %1",_veh];};
#endif #endif
_veh _veh

View File

@ -25,23 +25,23 @@ params["_center","_pos",["_vehType","I_G_Offroad_01_armed_F"],["_minDis",30],["_
//_maxDis = maximum distance from the center of the mission for vehicle waypoints //_maxDis = maximum distance from the center of the mission for vehicle waypoints
//_groupForVehiclePatrol = The group with which to man the vehicle //_groupForVehiclePatrol = The group with which to man the vehicle
#ifdef blck_debugMode //#ifdef blck_debugMode
if (blck_debugLevel > 2) then if (blck_debugLevel > 1) then
{ {
diag_log format["_fnc_spawnVehiclePatrol:: _center = %1 | _pos = %2 | _vehType = %3 | _group = %4",_center,_pos,_vehType,_group]; diag_log format["_fnc_spawnVehiclePatrol:: _center = %1 | _pos = %2 | _vehType = %3 | _group = %4",_center,_pos,_vehType,_group];
}; };
#endif //#endif
if !(isNull _group) then if !(isNull _group) then
{ // exitWith {diag_log "[blckeagls] ERROR CONDITION:-->> NULL-GROUP Provided to _fnc_spawnVehiclePatrol"; objNull;}; { // exitWith {diag_log "[blckeagls] ERROR CONDITION:-->> NULL-GROUP Provided to _fnc_spawnVehiclePatrol"; objNull;};
_veh = [_vehType,_pos] call blck_fnc_spawnVehicle; _veh = [_vehType,_pos] call blck_fnc_spawnVehicle;
_group setVariable["groupVehicle",_veh];
#ifdef blck_debugMode //#ifdef blck_debugMode
if (blck_debugLevel > 2) then if (blck_debugLevel > 1) then
{ {
diag_log format["spawnVehiclePatrol:: vehicle spawned is %1 of typeof %2",_veh, typeOf _veh]; diag_log format["spawnVehiclePatrol:: vehicle spawned is %1 of typeof %2",_veh, typeOf _veh];
}; };
#endif //#endif
private["_unitNumber"]; private["_unitNumber"];
_unitNumber = 0; _unitNumber = 0;
@ -56,6 +56,19 @@ if !(isNull _group) then
_unitNumber = _unitNumber + 1; _unitNumber = _unitNumber + 1;
}forEach (units _group); }forEach (units _group);
// params["_pos","_minDis","_maxDis","_group",["_mode","random"],["_pattern",["MOVE","SAD"]]];
_group setcombatmode "RED";
_group setBehaviour "COMBAT";
[_center,_minDis,_maxDis,_group,"perimeter","SAD","vehicle"] spawn blck_fnc_setupWaypoints;
};
//#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnVehiclePatrol::->> _veh = %1",_veh];
};
//#endif
_veh
/*
while {(count (waypoints _group)) > 0} do while {(count (waypoints _group)) > 0} do
{ {
deleteWaypoint ((waypoints _group) select 0); deleteWaypoint ((waypoints _group) select 0);
@ -94,13 +107,9 @@ if !(isNull _group) then
_wp = _group addWaypoint [_pos, 25]; _wp = _group addWaypoint [_pos, 25];
_wp setWaypointType "CYCLE"; _wp setWaypointType "CYCLE";
_group setVariable["wpIndex",0]; _group setVariable["wpIndex",0];
}; };
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_spawnVehiclePatrol::->> _veh = %1",_veh];
};
#endif
_veh */

View File

@ -23,15 +23,14 @@
*/ */
#include "\q\addons\custom_server\Configs\blck_defines.hpp"; #include "\q\addons\custom_server\Configs\blck_defines.hpp";
_fn_removeVehicleFromVehicleMonitoring = { //diag_log "_fnc_vehicleMonitor: starting function";
params["_veh"]; #ifdef blck_debugMode
blck_missionVehicles = blck_missionVehicles - [_veh]; //diag_log format["_fnc_vehicleMonitor:: blck_debugMode defined"];
}; #endif
_fn_releaseVehicle = { _fn_releaseVehicle = {
params["_v"]; params["_v"];
//diag_log format["vehicleMonitor.sqf: make vehicle available to players; stripping eventHandlers from _v %1",_v]; blck_monitoredVehicles = blck_monitoredVehicles - [_veh];
[_v] call _fn_removeVehicleFromVehicleMonitoring;
_v setVehicleLock "UNLOCKED" ; _v setVehicleLock "UNLOCKED" ;
//_v setVariable["releasedToPlayers",true]; //_v setVariable["releasedToPlayers",true];
[_v] call blck_fnc_emptyObject; [_v] call blck_fnc_emptyObject;
@ -40,28 +39,19 @@ _fn_releaseVehicle = {
} forEach ["GetIn","GetOut","fired","hit","hitpart","reloaded","dammaged","HandleDamage"]; } forEach ["GetIn","GetOut","fired","hit","hitpart","reloaded","dammaged","HandleDamage"];
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 2) then if (blck_debugLevel > 3) then
{ {
diag_log format["_fnc_vehicleMonitor:: case of patrol vehicle released to players where vehicle = %1",_v]; diag_log format["_fnc_vehicleMonitor:: case of patrol vehicle released to players where vehicle = %1",_v];
}; };
#endif #endif
}; };
_fn_deleteAIvehicle = {
params["_veh"];
{
_veh removeAllEventHandlers _x;
}forEach ["Hit","HitPart","GetIn","GetOut","Fired","FiredNear"];
[_veh] call _fn_removeVehicleFromVehicleMonitoring;
deleteVehicle _veh;
};
_fn_destroyVehicleAndCrew = { _fn_destroyVehicleAndCrew = {
params["_veh"]; params["_veh"];
private["_crew"]; private["_crew"];
_crew = crew _veh; _crew = crew _veh;
{[_x] call blck_fnc_deleteAI;} forEach _crew; {[_x] call blck_fnc_deleteAI;} forEach _crew;
[_veh] call _fn_deleteAIvehicle; [_veh] call blck_fn_deleteAIvehicle;
}; };
_fn_reloadAmmo = { _fn_reloadAmmo = {
@ -91,16 +81,30 @@ _fn_reloadAmmo = {
} forEach _crew; } forEach _crew;
}; };
}; };
blck_fn_deleteAIvehicle = {
params["_veh"];
{
_veh removeAllEventHandlers _x;
}forEach ["Hit","HitPart","GetIn","GetOut","Fired","FiredNear"];
blck_monitoredVehicles = blck_monitoredVehicles - [_veh];
deleteVehicle _veh;
};
private ["_veh","_vehList"]; private ["_veh","_vehList"];
_vehList = blck_missionVehicles; _vehList = +blck_monitoredVehicles;
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 1) then {diag_log format["_fnc_vehicleMonitor:: function called at %1",diag_tickTime];}; if (blck_debugLevel > 3) then {diag_log format["_fnc_vehicleMonitor:: function called at %1 with _vehList %2 and blck_monitoredVehicles %3",diag_tickTime,_vehList,blck_monitoredVehicles];};
#endif #endif
{ {
_veh = _x; // (purely for clarity at this point, _x could be used just as well) _veh = _x; // (purely for clarity at this point, _x could be used just as well)
#ifdef blck_debugMode
if (blck_debugLevel > 3) then
{
diag_log format["_fnc_vehicleMonitor: vehicle %1 with missionCompleted = %2 being evaluated",_x, _x getVariable"missionCompleted",0];
};
#endif
private["_evaluate"]; private["_evaluate"];
_evaluate = true; _evaluate = true;
// Case where vehicle has been marked for deletion after a certain time. // Case where vehicle has been marked for deletion after a certain time.
@ -118,7 +122,7 @@ if (blck_debugLevel > 1) then {diag_log format["_fnc_vehicleMonitor:: function c
if (blck_killEmptyStaticWeapons) then if (blck_killEmptyStaticWeapons) then
{ {
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 2) then {diag_log format["_fnc_vehicleMonitor:: case of destroyed where vehicle = %1",_veh];}; if (blck_debugLevel > 3) then {diag_log format["_fnc_vehicleMonitor:: case of destroyed where vehicle = %1",_veh];};
#endif #endif
_veh setDamage 1; _veh setDamage 1;
@ -154,7 +158,7 @@ if (blck_debugLevel > 1) then {diag_log format["_fnc_vehicleMonitor:: function c
private["_cleanupTimer"]; private["_cleanupTimer"];
_cleanupTimer = _veh getVariable["cleanupTimer",0]; // The time delat to deleting any alive AI units _cleanupTimer = _veh getVariable["cleanupTimer",0]; // The time delat to deleting any alive AI units
// "missionCompleted" = the time at which the mission was completed or aborted // "missionCompleted" = the time at which the mission was completed or aborted
if (diag_tickTime > (_cleanupTimer + (_veh getVariable["missionCompleted",0])) ) then if (diag_tickTime > ((blck_AliveAICleanUpTimer - 70) + (_veh getVariable["missionCompleted",0])) ) then
{ {
[_veh] call _fn_destroyVehicleAndCrew; [_veh] call _fn_destroyVehicleAndCrew;
_evaluate = false; _evaluate = false;

View File

@ -81,12 +81,12 @@ blck_fnc_missionAIareDead = compileFinal preprocessFileLineNumbers "\q\addons\cu
// Group-related functions // Group-related functions
blck_fnc_spawnGroup = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_spawnGroup.sqf"; // Spawn a single group and populate it with AI units] blck_fnc_spawnGroup = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_spawnGroup.sqf"; // Spawn a single group and populate it with AI units]
blck_fnc_setupWaypoints = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_setWaypoints.sqf"; // Set default waypoints for a group blck_fnc_setupWaypoints = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_setupWaypoints.sqf"; // Set default waypoints for a group
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_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_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_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_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_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 blck_fnc_cleanEmptyGroups = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Groups\GMS_fnc_cleanEmptyGroups.sqf"; // GMS_fnc_cleanEmptyGroups
// Functions specific to vehicles, whether wheeled, aircraft or static // Functions specific to vehicles, whether wheeled, aircraft or static

View File

@ -26,13 +26,12 @@ blck_locationBlackList = [];
blck_monitoredVehicles = []; blck_monitoredVehicles = [];
blck_livemissionai = []; blck_livemissionai = [];
blck_monitoredMissionAIGroups = []; // Used to track groups in active missions for whatever purpose blck_monitoredMissionAIGroups = []; // Used to track groups in active missions for whatever purpose
blck_liveMissionAIGroups = []; // Used to track groups assigned to completed missions for eventual cleanup.
blck_oldMissionObjects = []; blck_oldMissionObjects = [];
blck_pendingMissions = []; blck_pendingMissions = [];
blck_missionsRunning = 0; blck_missionsRunning = 0;
blck_activeMissions = []; blck_activeMissions = [];
blck_deadAI = []; blck_deadAI = [];
blck_missionVehicles = [];
// Arrays for use during cleanup of alive AI at some time after the end of a mission // Arrays for use during cleanup of alive AI at some time after the end of a mission
DBD_HeliCrashSites = []; DBD_HeliCrashSites = [];

View File

@ -148,10 +148,10 @@
blck_chanceHeliPatrolRed = 0; // 0.4; blck_chanceHeliPatrolRed = 0; // 0.4;
blck_patrolHelisRed = _blck_littleBirds; blck_patrolHelisRed = _blck_littleBirds;
blck_chanceHeliPatrolGreen = 0.2; blck_chanceHeliPatrolGreen = 0;
blck_patrolHelisGreen = _blck_littleBirds; blck_patrolHelisGreen = _blck_littleBirds;
blck_chanceHeliPatrolOrange = 0.5; blck_chanceHeliPatrolOrange = 0;
blck_patrolHelisOrange = _blck_littleBirds; //_blck_armed_hellcats+_blck_armed_orcas; blck_patrolHelisOrange = _blck_littleBirds; //_blck_armed_hellcats+_blck_armed_orcas;

View File

@ -23,19 +23,22 @@ _blck_loadingStartTime = diag_tickTime;
#include "\q\addons\custom_server\init\build.sqf"; #include "\q\addons\custom_server\init\build.sqf";
diag_log format["[blckeagls] Loading version %1 Build %2",_blck_versionDate,_blck_version]; diag_log format["[blckeagls] Loading version %1 Build %2",_blck_versionDate,_blck_version];
#ifdef DBDserver
diag_log "[blckegls] Running DBD Clan Version";
#endif
call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\blck_variables.sqf"; call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\blck_variables.sqf";
waitUntil {(isNil "blck_variablesLoaded") isEqualTo false;}; waitUntil {(isNil "blck_variablesLoaded") isEqualTo false;};
waitUntil{blck_variablesLoaded}; waitUntil{blck_variablesLoaded};
blck_variablesLoaded = nil; blck_variablesLoaded = nil;
if !(blck_debugON) then {uiSleep 60;}; //if !(blck_debugON) then {uiSleep 60;};
// compile functions // compile functions
call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\blck_functions.sqf"; call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\blck_functions.sqf";
waitUntil {(isNil "blck_functionsCompiled") isEqualTo false;}; waitUntil {(isNil "blck_functionsCompiled") isEqualTo false;};
waitUntil{blck_functionsCompiled}; waitUntil{blck_functionsCompiled};
blck_functionsCompiled = nil; blck_functionsCompiled = nil;
diag_log format["[blckeagls] debug mode settings:blck_debugON = %1",blck_debugON]; diag_log format["[blckeagls] debug mode settings:blck_debugON = %1 blck_debugLevel = %2",blck_debugON,blck_debugLevel];
execVM "\q\addons\custom_server\Configs\blck_configs.sqf"; execVM "\q\addons\custom_server\Configs\blck_configs.sqf";
waitUntil {(isNil "blck_configsLoaded") isEqualTo false;}; waitUntil {(isNil "blck_configsLoaded") isEqualTo false;};
@ -61,28 +64,40 @@ blck_worldSet = nil;
diag_log "[blckeagls] Loading Mission Lists"; diag_log "[blckeagls] Loading Mission Lists";
#include "\q\addons\custom_server\Missions\GMS_missionLists.sqf"; #include "\q\addons\custom_server\Missions\GMS_missionLists.sqf";
#ifdef DBDserver
//start the dynamic loot crate system
[] execVM "\q\addons\custom_server\DLS\DLS_init.sqf";
waitUntil {(isNil "blck_DLSComplete") isEqualTo false;};
waitUntil{blck_DLSComplete};
blck_DLSComplete = nil;
#endif
// Load any user-defined specifications or overrides // Load any user-defined specifications or overrides
call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Configs\blck_custom_config.sqf"; call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Configs\blck_custom_config.sqf";
diag_log format["[blckeagls] version %1 Build %2 Loaded in %3 seconds",_blck_versionDate,_blck_version,diag_tickTime - _blck_loadingStartTime]; //,blck_modType]; diag_log format["[blckeagls] version %1 Build %2 Loaded in %3 seconds",_blck_versionDate,_blck_version,diag_tickTime - _blck_loadingStartTime]; //,blck_modType];
diag_log format["blckeagls] waiting for players to join ---- >>>>"]; diag_log format["blckeagls] waiting for players to join ---- >>>>"];
if (!blck_debugON || (blck_debugLevel isEqualTo 0)) then
if !(blck_debugON || (blck_debugLevel isEqualTo 0)) then
{ {
waitUntil{{isPlayer _x}count playableUnits > 0}; waitUntil{{isPlayer _x}count playableUnits > 0};
diag_log "[blckeagls] Player Connected, spawning missions";
} else {
diag_log "[blckeagls] spawning Missions";
}; };
diag_log "[blckeagls] Player Connected, loading mission system";
if (blck_spawnStaticLootCrates) then if (blck_spawnStaticLootCrates) then
{ {
// Start the static loot crate spawner // Start the static loot crate spawner
diag_log "[blckeagls] SLS:: -- >> Static Loot Spawner Started";
[] execVM "\q\addons\custom_server\SLS\SLS_init.sqf"; [] execVM "\q\addons\custom_server\SLS\SLS_init.sqf";
waitUntil {(isNil "blck_SLSComplete") isEqualTo false;}; waitUntil {(isNil "blck_SLSComplete") isEqualTo false;};
waitUntil{blck_SLSComplete}; waitUntil{blck_SLSComplete};
blck_SLSComplete = nil; blck_SLSComplete = nil;
diag_log "[blckeagls] SLS:: -- >> Static Loot Spawner Done";
}else{ }else{
diag_log "[blckeagls] SLS:: -- >> Static Loot Spawner disabled"; diag_log "[blckeagls] SLS:: -- >> Static Loot Spawner disabled";
}; };
blck_spawnStaticLootCrates = nil;
//Start the mission timers //Start the mission timers
if (blck_enableOrangeMissions > 0) then if (blck_enableOrangeMissions > 0) then
@ -105,6 +120,26 @@ if (blck_enableBlueMissions > 0) then
//[_missionListBlue,_pathBlue,"BlueMarker","blue",blck_TMin_Blue,blck_TMax_Blue] spawn blck_fnc_missionTimer;//Starts minor mission system (Blue Map Markers) //[_missionListBlue,_pathBlue,"BlueMarker","blue",blck_TMin_Blue,blck_TMax_Blue] spawn blck_fnc_missionTimer;//Starts minor mission system (Blue Map Markers)
[_missionListBlue,_pathBlue,"BlueMarker","blue",blck_TMin_Blue,blck_TMax_Blue,blck_enableBlueMissions] call blck_fnc_addMissionToQue; [_missionListBlue,_pathBlue,"BlueMarker","blue",blck_TMin_Blue,blck_TMax_Blue,blck_enableBlueMissions] call blck_fnc_addMissionToQue;
}; };
#ifdef DBDserver
if (blck_enableScoutsMissions > 0) then
{
//[_missionListScouts,_pathScouts,"ScoutsMarker","red",blck_TMin_Scouts,blck_TMax_Scouts] spawn blck_fnc_missionTimer;
[_missionListScouts,_pathScouts,"ScoutsMarker","red",blck_TMin_Scouts,blck_TMax_Scouts,blck_enableScoutsMissions, false] call blck_fnc_addMissionToQue;
};
if (blck_enableHunterMissions > 0) then
{
//[_missionListHunters,_pathHunters,"HunterMarker","green",blck_TMin_Hunter,blck_TMax_Hunter] spawn blck_fnc_missionTimer;
// params["_missionList","_path","_marker","_difficulty","_tMin","_tMax","_noMissions"];
[_missionListHunters,_pathHunters,"HunterMarker","green",blck_TMin_Hunter,blck_TMax_Hunter,blck_enableHunterMissions, false] call blck_fnc_addMissionToQue;
};
// Running new version of Crash sites.
if (blck_maxCrashSites > 0) then
{
[] execVM "\q\addons\custom_server\Missions\HeliCrashs\Crashes2.sqf";
};
#endif
// start the main thread for the mission system which monitors missions running and stuff to be cleaned up // start the main thread for the mission system which monitors missions running and stuff to be cleaned up
[] spawn blck_fnc_mainThread; [] spawn blck_fnc_mainThread;
diag_log "[blckeagls] Mission spawner started";

View File

@ -1,15 +1,3 @@
/*
By Ghostrider-DbD
Last Modified 4-11-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 ["_version","_versionDate"]; private ["_version","_versionDate"];
_blck_version = "6.58 Build 53"; _blck_version = "6.58 Build 57";
_blck_versionDate = "4-11-17 8:00 PM"; _blck_versionDate = "4-30-17 8:00 PM";

35
FAQ.txt
View File

@ -1,11 +1,18 @@
Core Mission System. This addon includes several modules which will be discussed in the following order:
1. The core, dynamic mission system
2. A static mission system (WIP)
3. A custom time acceleration module
4. A module to execute scripts for custom bases and so forths.
5. A module to spawn loot crates in specific locations at server startup.
1. Core Mission System.
The core mission system is configured to run 4 different classes of mission (Blue, Red, Green and Orange) simultaneously. The core mission system is configured to run 4 different classes of mission (Blue, Red, Green and Orange) simultaneously.
Reducing value for ...\custom_serer\configs\blck_configs.sqf\blck_maxSpawnedMissions will reduce the number of missions running on the server. Reducing value for ...\custom_serer\configs\blck_configs.sqf\blck_maxSpawnedMissions will reduce the number of missions running on the server.
General settings include the ability set whether and how messages to players regarding missions spawned or completed are displayed, General settings include:
the ability set whether and how messages to players regarding missions spawned or completed are displayed,
whether and how messages to players regarding killed AI are displayed whether and how messages to players regarding killed AI are displayed
Number of AI groups; Number of AI groups;
Number of AI per group; Number of AI per group;
AI skills; AI skills;
@ -13,6 +20,11 @@ General settings include the ability set whether and how messages to players reg
Number and type of armed vehicle patrols. Number and type of armed vehicle patrols.
Presence of AI helicopter patrols. Presence of AI helicopter patrols.
Whether such patrols drop AI reinforcements. Whether such patrols drop AI reinforcements.
Whether vehicles are destroyed when AI are killed
Whether static weapons are destroyed when AI are killed.
Whether AI spawn with NVG or launchers and what types they spawn with.
Whether NVG or launchers are deleted.
Whether players are penalized for running over AI.
Loot can also be configured for each mission class. You can modify the number of weapons, magazines, items, construction materials, etc. Loot can also be configured for each mission class. You can modify the number of weapons, magazines, items, construction materials, etc.
You can also adjust the choices for each of these types of items. You can also adjust the choices for each of these types of items.
@ -23,7 +35,7 @@ General settings include the ability set whether and how messages to players reg
Where possible, I have tried group weapons based on desirability from low rank (5.56 ammo) to high rank (7.6 caliber or larger, large bore sniper, heavy LMG) then combine these groups to define parameters as needed. Where possible, I have tried group weapons based on desirability from low rank (5.56 ammo) to high rank (7.6 caliber or larger, large bore sniper, heavy LMG) then combine these groups to define parameters as needed.
The missions themselves are spawned from templates which can be used to define: The missions themselves are spawned from templates which can be used to define most aspects of the missions including:
the messages sent to players; the messages sent to players;
text used to label the mark text used to label the mark
type of marker used to label the map type of marker used to label the map
@ -45,12 +57,13 @@ Performance considerations.
At present, missions do not actually spawn objects or players untill a player is within the trigger distance (1000 M). At present, missions do not actually spawn objects or players untill a player is within the trigger distance (1000 M).
Hence, performance penalties should be modest to none until players engage a mission. Hence, performance penalties should be modest to none until players engage a mission.
There is some performance penalty to having a lot of dead AI on the server, or a lot of spawned objects used for scenery at AI missions. Hence, these are deleted after a certain time. There is some performance penalty to having a lot of dead AI on the server, or a lot of spawned objects used for scenery at AI missions. Hence, these are deleted after a certain time.
You can shorten the time after which bodies or scenery are deleted if you believe performance is an issue.
Static Mission System (WIP). 2. Static Mission System (WIP).
Additional Modules Available: Additional Modules Available:
1. Time Acceleration 3. Time Acceleration
This provides an optional ability to accelerate time by user-specified factors. This provides an optional ability to accelerate time by user-specified factors.
The time acceleration can be specified for night, daytime and dusk. The time acceleration can be specified for night, daytime and dusk.
@ -63,7 +76,7 @@ Variables controlling the time acceleration module are located in ...\custom_ser
Note that map/mod specific settings can be specified in blck_custom_config.sqf if that is helpful. Note that map/mod specific settings can be specified in blck_custom_config.sqf if that is helpful.
2. Map Addons 4. Map Addons
This module allows you to load map-addons (custom bases, enhancements to villages or towns, ATMs at traders etc) but to do so in a way that is map and mod-specific. This module allows you to load map-addons (custom bases, enhancements to villages or towns, ATMs at traders etc) but to do so in a way that is map and mod-specific.
I use it to manage the map addons we run on multiple different Arma servers. I use it to manage the map addons we run on multiple different Arma servers.
@ -74,18 +87,18 @@ blck_spawnMapAddons = false;
You can define which addons you wish to load in ...\custom_server\MapAddons\MapAddons_init.sqf. You can define which addons you wish to load in ...\custom_server\MapAddons\MapAddons_init.sqf.
3. Static Loot System 5. Static Loot System
This module spawns loot crates at pre-specified locations on the ground, inside buildings or on roofs. This module spawns loot crates at pre-specified locations on the ground, inside buildings or on roofs.
It is designed to function in conjunction with the Map Addons module if you wish it to. It is designed to function in conjunction with the Map Addons module if you wish it to.
It was derived from the loot crate spawner originally released by DarthRogue but has been extensively revised. It was derived from the loot crate spawner originally released by DarthRogue but has been extensively revised.
One enhancement is that I have written the code so that you do not need to sort items by there arma type (weapon, magazine, item). One enhancement is that I have written the code so that you do not need to sort items by their arma type (weapon, magazine, item).
In any event, it is a great tool for placing loot chests at AI strongholds or static missions. In any event, it is a great tool for placing loot chests at AI strongholds or static missions.
Some basic features are: Some basic features are:
Crates can be spawned at precise locations with / without a nearby smoking wreck to mark their location (which crates an apololyptic feel). Crates can be spawned at precise locations with / without a nearby smoking wreck to mark their location (which crates an apololyptic feel).
Crates can be loaded with one of 3 different loadouts (add more if you like) which can be specified or randomly determined. Crates can be loaded with one of 3 different loadouts (add more if you like) which can be specified or randomly determined.
If the number of possible spawn locations is greater than the number of crates to spawned, spawn locations will be randomly chosen giving some variation to your mission. If the number of possible spawn locations is greater than the number of crates to spawned, spawn locations will be randomly chosen giving some variation to your mission from one server restart to the next.
The static loot crate spawner is enabled/disable by changing the following variable in ...\custom_server\configs\blck_configs.sqf The static loot crate spawner is enabled/disable by changing the following variable in ...\custom_server\configs\blck_configs.sqf
@ -94,6 +107,4 @@ The static loot crate spawner is enabled/disable by changing the following varia
I wrote the crate spawner in a way that helps me manage static loot crates across multiple maps and mods. I wrote the crate spawner in a way that helps me manage static loot crates across multiple maps and mods.
The configuration files for Epoch or Exile give examples of how to implement the system. The configuration files for Epoch or Exile give examples of how to implement the system.
Known issues
1.

View File

@ -17,22 +17,14 @@ Installation:
///////////////////////// /////////////////////////
// Battleye Exceptions // Battleye Exceptions
9) update the scripts.txt file in the Battleye directory in your server directory as directed below. More to come on this.
Please see the links below for some how-to's and two useful tools to automate adding appropriate exceptions:
7 deletemarker http://opendayz.net/threads/a-guide-to-battleye-filters.21066/
https://epochmod.com/forum/topic/29736-all-you-need-to-know-about-be-filters-but-were-too-lazy-to-google/
!"_MainMarker http://www.exilemod.com/topic/9779-releasetool-bem-battleye-filter-manager-by-themeq/
http://www.exilemod.com/topic/9256-battleye-filter-tool/
7 setMarker http://www.exilemod.com/topic/9708-battleye-filter-editor/
!"_MainMarker"
7 createMarker
!"_MainMarker"
10) Add the following to publicvariable.txt
!="blck_Message"
11) Merge the following into addbackpackcargo.txt
!"B_Kitbag_(cbr|mcamo|rgr|sgg)" !"B_Bergen_(mcamo|dgtl|hex|tna)_F" !"ViperHarness_(blk|ghex|hex|khk|oli)_F" !"ViperLightHarness_(blk|ghex|hex|khk|oli)_F" !"B_Carryall_(cbr|khk|mcamo|ocamo|oli|oucamo|hex|ghex)" !"B_AssaultPack_(cbr|dgtl|khk|mcamo|ocamo|rgr|sgg|blk)" !"B_FieldPack_(blk|cbr|khk|ocamo|oli|oucamo)" !"B_TacticalPack_(blk|mcamo|ocamo|oli|rgr)"
12) To permit you to loot crypto from dead AI on Epoch, Open Epoch.<MAP Name>\epoch_config\CfgObjectInteractions.hpp 12) To permit you to loot crypto from dead AI on Epoch, Open Epoch.<MAP Name>\epoch_config\CfgObjectInteractions.hpp

View File

@ -1,6 +1,6 @@
Blckegls mission system Ver 6.58 Blckegls mission system Ver 6.58
Build 54 Build 57
Included is an updated version of blckeagls mission system. This began as an effort to fix bugs in and upgrade version 2.0.2 as updated by Narines and has now evolved to a complete reworking of almost all code. Included is an updated version of blckeagls mission system. This began as an effort to fix bugs in and upgrade version 2.0.2 as updated by Narines and has now evolved to a complete reworking of almost all code.

View File

@ -4,14 +4,25 @@ Loosely based on the AI mission system by blckeagls ver 2.0.2
Contributions by Narines: bug fixes, testing, infinite ammo fix. Contributions by Narines: bug fixes, testing, infinite ammo fix.
Ideas or code from that by Vampire and KiloSwiss have been used for certain functions. Ideas or code from that by Vampire and KiloSwiss have been used for certain functions.
4/6/17 Version 6.58 Build 54 4/29/17 Version 6.58 Build 57
[Added] A FAQ presenting an overview of the mission system and addons. [Added] A FAQ presenting an overview of the mission system and addons.
[Changed] Helicopter crew waypoint system reverted to that from Build 46. [Added] Optional helicopter patrols that drop paratroops. These can be configured using variables in blck_configs.sqf:
For example, settings for the blue difficulty for missions are shown below.
blck_chanceParaBlue = 0.1; // [0 - 1] set to 0 to deactivate and 1 to always have paratroops spawn over the center of the mission.
blck_noParaBlue = 3; // [1-N]
[Changed] A new method for dynamically setting waypoints was added and waypoints are now scanned to detect and correct the case that AI get 'stuck', meaning the waypoint is never completed.
[Changes] AI behaviors should be more agressive.
[Changed] License information added to all files.
[Added] Preprocessor definitions included in all files.
[Fixed] Mission timouts would prevent new missions from spawning after a while. [Fixed] Mission timouts would prevent new missions from spawning after a while.
[Fixed] blck_timeAcceleration now determines if time acceleration is activated. [Fixed] blck_timeAcceleration now determines if time acceleration is activated.
[Fixed] Missions did not complete correctly under certain circumstances. [Fixed] Missions did not complete correctly under certain circumstances.
[Fixed] Mission vehicles were not properly deleted, unlocked or otherwise handled at misison end or when AI crew were killed. [Fixed] Mission vehicles were not properly deleted, unlocked or otherwise handled at misison end or when AI crew were killed.
[Fixed] Throws errors when evaluating errors related to certain disallowed types of kills. [Fixed] Throws errors when evaluating errors related to certain disallowed types of kills.
[Fixed] Static loot crate spawner spawned empty crates under some circumstances.
Known errors: throws errors with certain loot crate setups (Exile) Known errors: throws errors with certain loot crate setups (Exile)
3/23/17 Verision 6.58 build 48 3/23/17 Verision 6.58 build 48