More bug fixes; reverted waypoint configuration for helicopters to that from build 46; added license info to all files.
This commit is contained in:
parent
8b74da3825
commit
12e8da662d
@ -1,5 +1,14 @@
|
|||||||
//This script sends Message Information to allplayers
|
//This script sends Message Information to allplayers
|
||||||
// Last modified 1/4/17 by Ghostrider-DBD-
|
// Last modified 1/4/17 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";
|
||||||
|
|
||||||
//blck_Message = _this;
|
//blck_Message = _this;
|
||||||
params["_msg",["_players",playableUnits]];
|
params["_msg",["_players",playableUnits]];
|
||||||
|
@ -2,7 +2,16 @@
|
|||||||
Determines the total number of spawned groups on the side used by the mission system and returns this value.
|
Determines the total number of spawned groups on the side used by the mission system and returns this value.
|
||||||
By Ghostrider-DbD-
|
By Ghostrider-DbD-
|
||||||
Last updated 12/21/16
|
Last updated 12/21/16
|
||||||
|
/*
|
||||||
|
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";
|
||||||
|
|
||||||
private _Groups_AI_Side = 0;
|
private _Groups_AI_Side = 0;
|
||||||
|
|
||||||
|
@ -5,7 +5,14 @@
|
|||||||
By Ghostrider-DBD-
|
By Ghostrider-DBD-
|
||||||
Copyright 2016
|
Copyright 2016
|
||||||
Last Modified 2/24/17
|
Last Modified 2/24/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 ["_result"];
|
private ["_result"];
|
||||||
|
@ -1,5 +1,16 @@
|
|||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
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";
|
||||||
|
|
||||||
blck_serverFPS = diag_FPS;
|
blck_serverFPS = diag_FPS;
|
||||||
publicVariable "blck_serverFPS";
|
publicVariable "blck_serverFPS";
|
||||||
|
|
||||||
|
@ -3,7 +3,15 @@
|
|||||||
Deletes any empty groups and thereby prevents errors resulting from createGroup returning nullGroup.
|
Deletes any empty groups and thereby prevents errors resulting from createGroup returning nullGroup.
|
||||||
By Ghostrider-DbD-
|
By Ghostrider-DbD-
|
||||||
11/16/16
|
11/16/16
|
||||||
|
--------------------------
|
||||||
|
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
|
#ifdef blck_debugMode
|
||||||
if (blck_debugLevel > 2) then
|
if (blck_debugLevel > 2) then
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,16 @@
|
|||||||
|
|
||||||
|
/*
|
||||||
|
Remove all inventory from an object.
|
||||||
|
By Ghostrider-DbD0
|
||||||
|
--------------------------
|
||||||
|
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["_veh"];
|
params["_veh"];
|
||||||
clearWeaponCargoGlobal _veh;
|
clearWeaponCargoGlobal _veh;
|
||||||
clearMagazineCargoGlobal _veh;
|
clearMagazineCargoGlobal _veh;
|
||||||
|
@ -4,7 +4,14 @@
|
|||||||
By Ghostrider-DBD-
|
By Ghostrider-DBD-
|
||||||
Copyright 2016
|
Copyright 2016
|
||||||
Last Modified 1-22-17
|
Last Modified 1-22-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["_locs","_startDir","_currentDir","_Arc","_dist","_newpos"];
|
private["_locs","_startDir","_currentDir","_Arc","_dist","_newpos"];
|
||||||
params["_center","_num","_minDistance","_maxDistance"];
|
params["_center","_num","_minDistance","_maxDistance"];
|
||||||
|
@ -6,7 +6,15 @@
|
|||||||
By Ghostrider-DBD-
|
By Ghostrider-DBD-
|
||||||
Copyright 2016
|
Copyright 2016
|
||||||
Last Modified 1-22-17
|
Last Modified 1-22-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["_findNew","_coords","_dist","_xpos","_ypos","_newPos","_townPos","_pole"];
|
private["_findNew","_coords","_dist","_xpos","_ypos","_newPos","_townPos","_pole"];
|
||||||
|
|
||||||
_findNew = true;
|
_findNew = true;
|
||||||
|
@ -3,7 +3,15 @@
|
|||||||
Trader coordinates were pulled from the config.cfg
|
Trader coordinates were pulled from the config.cfg
|
||||||
Inspired by the Vampire and DZMS
|
Inspired by the Vampire and DZMS
|
||||||
Last Modified 9/3/16
|
Last Modified 9/3/16
|
||||||
|
--------------------------
|
||||||
|
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["_blck_WorldName"];
|
private["_blck_WorldName"];
|
||||||
|
|
||||||
_blck_WorldName = toLower format ["%1", worldName];
|
_blck_WorldName = toLower format ["%1", worldName];
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
/*
|
/*
|
||||||
Based on code by IT07 written for VEMF_r
|
Based on code by IT07 written for VEMF_r
|
||||||
|
--------------------------
|
||||||
|
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 "_mod";
|
private "_mod";
|
||||||
|
|
||||||
|
@ -1,4 +1,14 @@
|
|||||||
// pull trader cities from config
|
// pull trader cities from config
|
||||||
|
/*
|
||||||
|
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";
|
||||||
|
|
||||||
if !(blck_blacklistTraderCities) exitWith {};
|
if !(blck_blacklistTraderCities) exitWith {};
|
||||||
diag_log format["[blckeagls] Adding Trader Cities to blacklisted locations based on setting for blck_blacklistTraderCities = %1",blck_blacklistTraderCities];
|
diag_log format["[blckeagls] Adding Trader Cities to blacklisted locations based on setting for blck_blacklistTraderCities = %1",blck_blacklistTraderCities];
|
||||||
|
@ -1,4 +1,15 @@
|
|||||||
// pull trader cities from config
|
// pull trader cities from config
|
||||||
|
/*
|
||||||
|
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";
|
||||||
|
|
||||||
private _traderCites = allMapMarkers;
|
private _traderCites = allMapMarkers;
|
||||||
_tc = [];
|
_tc = [];
|
||||||
{
|
{
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
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";
|
||||||
//#define DBDserver 1
|
|
||||||
|
|
||||||
diag_log format["starting _fnc_mainThread with time = %1",diag_tickTime];
|
diag_log format["starting _fnc_mainThread with time = %1",diag_tickTime];
|
||||||
|
|
||||||
|
@ -2,7 +2,16 @@
|
|||||||
Check if an HC is connected and if so transfer some AI to it.
|
Check if an HC is connected and if so transfer some AI to it.
|
||||||
By Ghostrider-DbD-
|
By Ghostrider-DbD-
|
||||||
Last modified 11-8-16
|
Last modified 11-8-16
|
||||||
|
/*
|
||||||
|
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";
|
||||||
|
|
||||||
private _hc = missionNamespace getVariable["HC1","null"];
|
private _hc = missionNamespace getVariable["HC1","null"];
|
||||||
diag_log format["monitorHC::->> _hc = %1",_hc];
|
diag_log format["monitorHC::->> _hc = %1",_hc];
|
||||||
|
@ -5,7 +5,16 @@
|
|||||||
By Ghostrider-DBD-
|
By Ghostrider-DBD-
|
||||||
Copyright 2016
|
Copyright 2016
|
||||||
Last Modified 2/24/17
|
Last Modified 2/24/17
|
||||||
|
/*
|
||||||
|
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";
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
||||||
private ["_result","_players"];
|
private ["_result","_players"];
|
||||||
|
@ -5,7 +5,16 @@
|
|||||||
By Ghostrider-DBD-
|
By Ghostrider-DBD-
|
||||||
Copyright 2016
|
Copyright 2016
|
||||||
Last Modified 2/24/17
|
Last Modified 2/24/17
|
||||||
|
/*
|
||||||
|
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";
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
||||||
private ["_result"];
|
private ["_result"];
|
||||||
|
@ -5,7 +5,16 @@
|
|||||||
By Ghostrider-DBD-
|
By Ghostrider-DBD-
|
||||||
Copyright 2016
|
Copyright 2016
|
||||||
Last Modified 8-13-16
|
Last Modified 8-13-16
|
||||||
|
/*
|
||||||
|
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";
|
||||||
////////////////////////////////////////////
|
////////////////////////////////////////////
|
||||||
|
|
||||||
private["_newX","_newY"];
|
private["_newX","_newY"];
|
||||||
|
@ -4,6 +4,15 @@
|
|||||||
// Last modified 1/22/17
|
// Last modified 1/22/17
|
||||||
// [_startTime] call blck_fnc_timedOut
|
// [_startTime] call blck_fnc_timedOut
|
||||||
// Returns true (timed out) or false (not timed out)
|
// Returns true (timed out) or false (not timed out)
|
||||||
|
/*
|
||||||
|
--------------------------
|
||||||
|
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["_startTime"];
|
params["_startTime"];
|
||||||
|
@ -8,7 +8,16 @@
|
|||||||
Call as
|
Call as
|
||||||
[_minTime, _maxTime] call blck_fnc_waitTimer
|
[_minTime, _maxTime] call blck_fnc_waitTimer
|
||||||
Returns true;
|
Returns true;
|
||||||
|
/*
|
||||||
|
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";
|
||||||
private["_wait","_Tstart"];
|
private["_wait","_Tstart"];
|
||||||
params["_min","_max"];
|
params["_min","_max"];
|
||||||
|
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
// Sets the WP type for WP for the specified group and updates other atributes accordingly.
|
|
||||||
/*
|
|
||||||
for DBD Clan
|
|
||||||
By Ghostrider-DBD-
|
|
||||||
Copyright 2016
|
|
||||||
Last modified 3/14/17
|
|
||||||
|
|
||||||
--------------------------
|
|
||||||
License
|
|
||||||
--------------------------
|
|
||||||
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
|
|
||||||
|
|
||||||
http://creativecommons.org/licenses/by-nc-sa/4.0/
|
|
||||||
*/
|
|
||||||
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
|
|
||||||
|
|
||||||
private["_group","_wp"];
|
|
||||||
|
|
||||||
//diag_log format["_fnc_changeToSADWaypoint:: -- :: _this = %1 and typName _this %2",_this, typeName _this];
|
|
||||||
_group = group _this;
|
|
||||||
//diag_log format["_fnc_changeToSADWaypoint:: -- >> group to update is %1 with typeName %2",_group, typeName _group];
|
|
||||||
|
|
||||||
_group setVariable["timeStamp",diag_tickTime];
|
|
||||||
_wp = [_group, 0];
|
|
||||||
_group setCurrentWaypoint _wp;
|
|
||||||
_wp setWaypointType "SAD";
|
|
||||||
_wp setWaypointName "sad";
|
|
||||||
//_wp setWaypointBehaviour "COMBAT";
|
|
||||||
//_wp setWaypointCombatMode "RED";
|
|
||||||
_wp setWaypointTimeout [60,75,90];
|
|
||||||
_wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a Move Waypoint',group this];"];
|
|
||||||
|
|
||||||
|
|
@ -3,7 +3,14 @@
|
|||||||
Deletes any empty groups and thereby prevents errors resulting from createGroup returning nullGroup.
|
Deletes any empty groups and thereby prevents errors resulting from createGroup returning nullGroup.
|
||||||
By Ghostrider-DbD-
|
By Ghostrider-DbD-
|
||||||
3/18/17
|
3/18/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
|
#ifdef blck_debugMode
|
||||||
if (blck_debugLevel > 2) then
|
if (blck_debugLevel > 2) then
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
By Ghostrider-DBD-
|
By Ghostrider-DBD-
|
||||||
Copyright 2016
|
Copyright 2016
|
||||||
Last modified 3/22/17
|
Last modified 3/22/17
|
||||||
|
** Here for record keeping only; not used **
|
||||||
--------------------------
|
--------------------------
|
||||||
License
|
License
|
||||||
--------------------------
|
--------------------------
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
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";
|
||||||
|
|
||||||
//diag_log format["_fnc_addLiveAIToQue:: -> when called, blck_liveMissionAI = %1",blck_liveMissionAI];
|
//diag_log format["_fnc_addLiveAIToQue:: -> when called, blck_liveMissionAI = %1",blck_liveMissionAI];
|
||||||
params["_aiList","_timeDelay"];
|
params["_aiList","_timeDelay"];
|
||||||
//diag_log format["_fnc_addLiveAIToQue:: -->> _aiList = %1 || _timeDelay = %2",_aiList,_timeDelay];
|
//diag_log format["_fnc_addLiveAIToQue:: -->> _aiList = %1 || _timeDelay = %2",_aiList,_timeDelay];
|
||||||
|
@ -16,9 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
#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]];
|
params["_mines","_objects","_crates","_blck_AllMissionAI","_endMsg","_blck_localMissionMarker","_coords","_mission",["_aborted",false],["_patrolVehicles",[]]];
|
||||||
diag_log format["_fnc_endMission: _blck_localMissionMarker %1 | _coords %2 | _mission %3 | _aborted %4",_blck_localMissionMarker,_coords,_mission,_aborted];
|
//diag_log format["_fnc_endMission: _blck_localMissionMarker %1 | _coords %2 | _mission %3 | _aborted %4",_blck_localMissionMarker,_coords,_mission,_aborted];
|
||||||
uisleep 0.1;
|
//uisleep 0.1;
|
||||||
#ifdef blck_debugMode
|
#ifdef blck_debugMode
|
||||||
if (blck_debugLevel > 0) then {
|
if (blck_debugLevel > 0) then {
|
||||||
diag_log format["_fnc_endMission: _aborted = %1",_aborted];
|
diag_log format["_fnc_endMission: _aborted = %1",_aborted];
|
||||||
@ -79,6 +79,10 @@
|
|||||||
|
|
||||||
[_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];
|
||||||
|
@ -5,7 +5,15 @@
|
|||||||
By Ghostrider-DBD-
|
By Ghostrider-DBD-
|
||||||
Copyright 2016
|
Copyright 2016
|
||||||
Last Modified 3-13-17
|
Last Modified 3-13-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 ["_missionAIGroups"];
|
params ["_missionAIGroups"];
|
||||||
private["_allAIDead","_group"];
|
private["_allAIDead","_group"];
|
||||||
|
|
||||||
|
@ -1,353 +0,0 @@
|
|||||||
/*
|
|
||||||
Generic Mission Spawner
|
|
||||||
for DBD Clan
|
|
||||||
By Ghostrider-DBD-
|
|
||||||
Copyright 2016
|
|
||||||
Last modified 3/18/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 ["_abort","_crates","_aiGroup","_objects","_groupPatrolRadius","_missionLandscape","_mines","_blck_AllMissionAI","_blck_localMissionMarker","_AI_Vehicles","_timeOut","_aiDifficultyLevel"];
|
|
||||||
params["_coords","_mission",["_allowReinforcements",true]];
|
|
||||||
diag_log format["_missionSpawner (18):: _allowReinforcements = %1",_allowReinforcements];
|
|
||||||
|
|
||||||
////////
|
|
||||||
// set all variables needed for the missions
|
|
||||||
// data is pulled either from the mission description or from the _mission variable passsed as a parameter
|
|
||||||
// Deal with situations where some of these variables might not be defined as well.
|
|
||||||
////////
|
|
||||||
|
|
||||||
// _mission params[_missionListOrange,_pathOrange,"OrangeMarker","orange",blck_TMin_Orange,blck_TMax_Orange];
|
|
||||||
_markerClass = _mission select 2;
|
|
||||||
_aiDifficultyLevel = _mission select 3;
|
|
||||||
|
|
||||||
if (blck_debugLevel > 0) then {diag_log format["_fnc_mainThread:: -->> _markerClass = %1",_markerClass];};
|
|
||||||
|
|
||||||
[_mission,"active",_coords] call blck_fnc_updateMissionQue;
|
|
||||||
blck_ActiveMissionCoords pushback _coords;
|
|
||||||
diag_log format["[blckeagls] missionSpawner (17):: Initializing mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
|
||||||
|
|
||||||
private["_chanceHeliPatrol","_noPara","_reinforcementLootCounts","_chanceLoot","_heliCrew","_loadCratesTiming"];
|
|
||||||
|
|
||||||
if (isNil "_markerColor") then {_markerColor = "ColorBlack"};
|
|
||||||
if (isNil "_markerType") then {_markerType = ["mil_box",[]]};
|
|
||||||
if (isNil "_timeOut") then {_timeOut = -1;};
|
|
||||||
if (isNil "_loadCratesTiming") then {_loadCratesTiming = blck_loadCratesTiming}; // valid choices are "atMissionCompletion" and "atMissionSpawn";
|
|
||||||
|
|
||||||
private["_useMines","_blck_AllMissionAI","_delayTime","_groupPatrolRadius"];
|
|
||||||
if (isNil "_useMines") then {_useMines = blck_useMines;};
|
|
||||||
|
|
||||||
_objects = [];
|
|
||||||
_mines = [];
|
|
||||||
_crates = [];
|
|
||||||
_aiGroup = [];
|
|
||||||
_missionAIVehicles = [];
|
|
||||||
_blck_AllMissionAI = [];
|
|
||||||
_AI_Vehicles = [];
|
|
||||||
_blck_localMissionMarker = [_markerClass,_coords,"","",_markerColor,_markerType];
|
|
||||||
_delayTime = 1;
|
|
||||||
_groupPatrolRadius = 50;
|
|
||||||
|
|
||||||
if (blck_labelMapMarkers select 0) then
|
|
||||||
{
|
|
||||||
//diag_log "labeling map markers *****";
|
|
||||||
_blck_localMissionMarker set [2, _markerMissionName];
|
|
||||||
};
|
|
||||||
if !(blck_preciseMapMarkers) then
|
|
||||||
{
|
|
||||||
//diag_log "Map marker will be OFFSET from the mission position";
|
|
||||||
_blck_localMissionMarker set [1,[_coords,75] call blck_fnc_randomPosition];
|
|
||||||
};
|
|
||||||
_blck_localMissionMarker set [3,blck_labelMapMarkers select 1]; // Use an arrow labeled with the mission name?
|
|
||||||
if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (91) message players and spawn a mission marker";};
|
|
||||||
[["start",_startMsg,_blck_localMissionMarker select 2]] call blck_fnc_messageplayers;
|
|
||||||
[_blck_localMissionMarker] execVM "debug\spawnMarker.sqf";
|
|
||||||
if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (94) waiting for player to trigger the mission";};
|
|
||||||
|
|
||||||
////////
|
|
||||||
// All parameters are defined, lets wait until a player is nearby or the mission has timed out
|
|
||||||
////////
|
|
||||||
|
|
||||||
private["_wait","_missionStartTime","_playerInRange","_missionTimedOut"];
|
|
||||||
_missionStartTime = diag_tickTime;
|
|
||||||
_playerInRange = false;
|
|
||||||
_missionTimedOut = false;
|
|
||||||
_wait = true;
|
|
||||||
if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (105) starting mission trigger loop"};
|
|
||||||
|
|
||||||
while {_wait} do
|
|
||||||
{
|
|
||||||
//diag_log "missionSpawner:: top of mission trigger loop";
|
|
||||||
if (blck_debugLevel > 2) exitWith {_playerInRange = true;};
|
|
||||||
if ([_coords, blck_TriggerDistance, false] call blck_fnc_playerInRange) exitWith {_playerInRange = true;};
|
|
||||||
if ([_missionStartTime] call blck_fnc_timedOut) exitWith {_missionTimedOut = true;};
|
|
||||||
uiSleep 5;
|
|
||||||
//diag_log format["missionSpawner:: Trigger Loop - blck_debugLevel = %1 and _coords = %2",blck_debugLevel, _coords];
|
|
||||||
//diag_log format["missionSpawner:: Trigger Loop - players in range = %1",{isPlayer _x && _x distance2D _coords < blck_TriggerDistance} count allPlayers];
|
|
||||||
//diag_log format["missionSpawner:: Trigger Loop - timeout = %1", [_missionStartTime] call blck_fnc_timedOut];
|
|
||||||
};
|
|
||||||
|
|
||||||
if (_missionTimedOut) exitWith
|
|
||||||
{
|
|
||||||
// Deal with the case in which the mission timed out.
|
|
||||||
//["timeOut",_endMsg,_blck_localMissionMarker select 2] call blck_fnc_messageplayers;
|
|
||||||
blck_ActiveMissionCoords = blck_ActiveMissionCoords - [ _coords];
|
|
||||||
[_mission,"inactive",[0,0,0]] call blck_fnc_updateMissionQue;
|
|
||||||
[_blck_localMissionMarker select 0] call compile preprocessfilelinenumbers "debug\deleteMarker.sqf";
|
|
||||||
_blck_localMissionMarker set [1,[0,0,0]];
|
|
||||||
_blck_localMissionMarker set [2,""];
|
|
||||||
[_objects, 0.1] spawn blck_fnc_cleanupObjects;
|
|
||||||
if (blck_debugLevel > 0) then
|
|
||||||
{
|
|
||||||
diag_log format["[blckeagls] missionSpawner:: (105) Mission Timed Out: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
////////
|
|
||||||
// Spawn the mission objects, loot chest, and AI
|
|
||||||
////////
|
|
||||||
if (blck_debugLevel > 0) then
|
|
||||||
{
|
|
||||||
diag_log format["[blckeagls] missionSpawner:: (112) -- >> Mission tripped: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
|
||||||
};
|
|
||||||
|
|
||||||
if (count _missionLootBoxes > 0) then
|
|
||||||
{
|
|
||||||
_crates = [_coords,_missionLootBoxes,_loadCratesTiming] call blck_fnc_spawnMissionCrates;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_crates = [_coords,[[selectRandom blck_crateTypes,[0,0,0],_crateLoot,_lootCounts]], _loadCratesTiming] call blck_fnc_spawnMissionCrates;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
if (blck_cleanUpLootChests) then
|
|
||||||
{
|
|
||||||
_objects append _crates;
|
|
||||||
};
|
|
||||||
|
|
||||||
//uisleep 2;
|
|
||||||
|
|
||||||
if (blck_debugLevel > 0) then
|
|
||||||
{
|
|
||||||
diag_log format["[blckeagls] missionSpawner:: (136) Crates Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
|
||||||
};
|
|
||||||
private ["_temp"];
|
|
||||||
if (blck_SmokeAtMissions select 0) then // spawn a fire and smoke near the crate
|
|
||||||
{
|
|
||||||
_temp = [_coords,blck_SmokeAtMissions select 1] call blck_fnc_smokeAtCrates;
|
|
||||||
if (typeName _temp isEqualTo "ARRAY") then
|
|
||||||
{
|
|
||||||
_objects append _temp;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
uiSleep _delayTime;
|
|
||||||
if (_useMines) then
|
|
||||||
{
|
|
||||||
_mines = [_coords] call blck_fnc_spawnMines;
|
|
||||||
//uiSleep _delayTime;;
|
|
||||||
};
|
|
||||||
uiSleep _delayTime;
|
|
||||||
_temp = [];
|
|
||||||
if (_missionLandscapeMode isEqualTo "random") then
|
|
||||||
{
|
|
||||||
_temp = [_coords,_missionLandscape, 3, 15, 2] call blck_fnc_spawnRandomLandscape;
|
|
||||||
} else {
|
|
||||||
_temp = [_coords, floor(random(360)),_missionLandscape,true] call blck_fnc_spawnCompositionObjects;
|
|
||||||
//uiSleep 1;
|
|
||||||
};
|
|
||||||
if (typeName _temp isEqualTo "ARRAY") then
|
|
||||||
{
|
|
||||||
_objects append _temp;
|
|
||||||
};
|
|
||||||
//diag_log format["_fnc_missionSpawner:: (181)->> _objects = %1",_objects];
|
|
||||||
|
|
||||||
if (blck_debugLevel > 0) then
|
|
||||||
{
|
|
||||||
diag_log format["[blckeagls] missionSpawner:: (170) Landscape spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
|
||||||
};
|
|
||||||
|
|
||||||
uiSleep _delayTime;;
|
|
||||||
|
|
||||||
_temp = [_missionLootVehicles] call blck_fnc_spawnMissionLootVehicles;
|
|
||||||
//uisleep 1;
|
|
||||||
_crates append _temp;
|
|
||||||
|
|
||||||
uiSleep _delayTime;
|
|
||||||
|
|
||||||
_abort = false;
|
|
||||||
_temp = [[],[],false];
|
|
||||||
_temp = [_coords, _minNoAI,_maxNoAI,_aiDifficultyLevel,_uniforms,_headGear] call blck_fnc_spawnMissionAI;
|
|
||||||
//[_coords, _minNoAI,_maxNoAI,_aiDifficultyLevel,_uniforms,_headGear] call blck_fnc_spawnMissionAI;
|
|
||||||
|
|
||||||
if (blck_debugLevel > 2) then {
|
|
||||||
diag_log format["missionSpawner :: (185) blck_fnc_spawnMissionAI returned a value of _temp = %1",_temp]; uiSleep 1;
|
|
||||||
};
|
|
||||||
|
|
||||||
_abort = _temp select 1;
|
|
||||||
if (blck_debugLevel > 2) then {
|
|
||||||
diag_log format["missionSpawner :: (190) blck_fnc_spawnMissionAI returned a value of _abort = %1",_abort]; uiSleep 1;
|
|
||||||
};
|
|
||||||
if (_abort) exitWith
|
|
||||||
{
|
|
||||||
if (blck_debugLevel > 1) then {
|
|
||||||
diag_log "missionSpawner:: (194) grpNull returned, mission termination criteria met, calling blck_fnc_endMission"
|
|
||||||
};
|
|
||||||
[_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,true] call blck_fnc_endMission;
|
|
||||||
};
|
|
||||||
if !(_abort) then
|
|
||||||
{
|
|
||||||
_blck_AllMissionAI append (_temp select 0);
|
|
||||||
};
|
|
||||||
|
|
||||||
uiSleep _delayTime;
|
|
||||||
if (blck_debugLevel > 0) then
|
|
||||||
{
|
|
||||||
diag_log format["[blckeagls] missionSpawner:: (202) AI Patrols Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
|
||||||
};
|
|
||||||
_temp = [[],[],false];
|
|
||||||
_abort = false;
|
|
||||||
if (blck_useVehiclePatrols && (_noVehiclePatrols > 0)) then
|
|
||||||
{
|
|
||||||
_temp = [_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear,_markerClass] call blck_fnc_spawnMissionVehiclePatrols;
|
|
||||||
//[_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear,_markerClass] call blck_fnc_spawnMissionVehiclePatrols;
|
|
||||||
if (blck_debugLevel > 1) then {
|
|
||||||
diag_log format["missionSpawner :: (216) blck_fnc_spawnMissionVehiclePatrols returned _temp = %1",_temp];
|
|
||||||
};
|
|
||||||
if (typeName _temp isEqualTo "ARRAY") then
|
|
||||||
{
|
|
||||||
_abort = _temp select 2;
|
|
||||||
};
|
|
||||||
if !(_abort) then
|
|
||||||
{
|
|
||||||
_objects append (_temp select 0);
|
|
||||||
_blck_AllMissionAI append (_temp select 1);
|
|
||||||
if (blck_debugLevel > 0) then
|
|
||||||
{
|
|
||||||
diag_log format["[blckeagls] missionSpawner:: (216) Vehicle Patrols Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
if (_abort) exitWith
|
|
||||||
{
|
|
||||||
if (blck_debugLevel > 0) then {
|
|
||||||
diag_log "missionSpawner:: (222) grpNull returned, mission termination criteria met, calling blck_endMission";
|
|
||||||
};
|
|
||||||
[_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,true] call blck_fnc_endMission;
|
|
||||||
};
|
|
||||||
|
|
||||||
uiSleep _delayTime;
|
|
||||||
_temp = [[],[],false];
|
|
||||||
_abort = false;
|
|
||||||
if (blck_debugLevel > 0) then {diag_log format["missionSpawner:: (234) preparing to spawn emplaced weapons for _markerClass %3:: blck_useStatic = %1 and _noEmplacedWeapons = %2",blck_useStatic,_noEmplacedWeapons,_markerClass];};
|
|
||||||
if (blck_useStatic && (_noEmplacedWeapons > 0)) then
|
|
||||||
{
|
|
||||||
_temp = [_missionEmplacedWeapons,_noEmplacedWeapons,_aiDifficultyLevel,_coords,_uniforms,_headGear] call blck_fnc_spawnEmplacedWeaponArray;
|
|
||||||
if (blck_debugLevel > 2) then
|
|
||||||
{
|
|
||||||
diag_log format ["missionSpawner:: (232) blck_fnc_spawnEmplacedWeaponArray returned _temp = %1",_temp];
|
|
||||||
};
|
|
||||||
if (typeName _temp isEqualTo "ARRAY") then
|
|
||||||
{
|
|
||||||
_abort = _temp select 2;
|
|
||||||
};
|
|
||||||
if (blck_debugLevel > 2) then
|
|
||||||
{
|
|
||||||
diag_log format ["missionSpawner:: (241) _abort = %1",_abort];
|
|
||||||
|
|
||||||
};
|
|
||||||
if !(_abort) then
|
|
||||||
{
|
|
||||||
_objects append (_temp select 0);
|
|
||||||
_blck_AllMissionAI append (_temp select 1);
|
|
||||||
if (blck_debugLevel > 0) then
|
|
||||||
{
|
|
||||||
diag_log format["[blckeagls] missionSpawner:: (253) Static Weapons Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
if (_abort) exitWith
|
|
||||||
{
|
|
||||||
if (blck_debugLevel > 2) then
|
|
||||||
{
|
|
||||||
diag_log "missionSpawner:: (261) grpNull ERROR in blck_fnc_spawnEmplacedWeaponArray, mission termination criteria met, calling blck_endMission";
|
|
||||||
};
|
|
||||||
[_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,true] call blck_fnc_endMission;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (_allowReinforcements) then
|
|
||||||
{
|
|
||||||
_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout;
|
|
||||||
temp = [];
|
|
||||||
diag_log format["[blckeagls] missionSpawner:: (268) calling in reinforcements: Current mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
|
||||||
//params["_coords","_aiSkillsLevel","_weapons","_uniforms","_headgear"];
|
|
||||||
_temp = [_coords,_aiDifficultyLevel,_weaponList,_uniforms,_headGear] call blck_fnc_spawnMissionReinforcements;
|
|
||||||
if (blck_debugLevel > 2) then
|
|
||||||
{
|
|
||||||
diag_log format["missionSpawner:: _temp = %1",_temp];
|
|
||||||
};
|
|
||||||
if (typeName _temp isEqualTo "ARRAY") then
|
|
||||||
{
|
|
||||||
_abort = _temp select 2;
|
|
||||||
_objects pushback (_temp select 0);
|
|
||||||
_blck_AllMissionAI append (_temp select 1);
|
|
||||||
};
|
|
||||||
if (_abort) then
|
|
||||||
{
|
|
||||||
if (blck_debugLevel > 2) then
|
|
||||||
{
|
|
||||||
diag_log "missionSpawner:: (276) grpNul or ERROR in blck_fnc_spawnMissionReinforcements, mission termination criteria met, calling blck_endMission";
|
|
||||||
};
|
|
||||||
[_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,true] call blck_fnc_endMission;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
// Trigger for mission end
|
|
||||||
//diag_log format["[blckeagls] mission Spawner _endCondition = %1",_endCondition];
|
|
||||||
private["_missionComplete","_endIfPlayerNear","_endIfAIKilled"];
|
|
||||||
_missionComplete = -1;
|
|
||||||
_startTime = diag_tickTime;
|
|
||||||
|
|
||||||
switch (_endCondition) do
|
|
||||||
{
|
|
||||||
case "playerNear": {_endIfPlayerNear = true;_endIfAIKilled = false;};
|
|
||||||
case "allUnitsKilled": {_endIfPlayerNear = false;_endIfAIKilled = true;};
|
|
||||||
case "allKilledOrPlayerNear": {_endIfPlayerNear = true;_endIfAIKilled = true;};
|
|
||||||
};
|
|
||||||
//diag_log format["missionSpawner :: (269) _endIfPlayerNear = %1 _endIfAIKilled= %2",_endIfPlayerNear,_endIfAIKilled];
|
|
||||||
private["_locations"];
|
|
||||||
_locations = [_coords] + _crates;
|
|
||||||
|
|
||||||
//diag_log format["missionSpawner:: Waiting for player to satisfy mission end criteria of _endIfPlayerNear %1 with _endIfAIKilled %2",_endIfPlayerNear,_endIfAIKilled];
|
|
||||||
while {_missionComplete isEqualTo -1} do
|
|
||||||
{
|
|
||||||
if (blck_debugLevel isEqualTo 3) exitWith {uiSleep 300};
|
|
||||||
if ((_endIfPlayerNear) && [_coords,10,true] call blck_fnc_playerInRange) exitWith {};
|
|
||||||
if ((_endIfAIKilled) && [_blck_AllMissionAI] call blck_fnc_missionAIareDead ) exitWith {};
|
|
||||||
//diag_log format["missionSpawner:: (283) missionCompleteLoop - > players near = %1 and ai alive = %2",[_coords,20] call blck_fnc_playerInRange, {alive _x} count _blck_AllMissionAI];
|
|
||||||
uiSleep 2;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (blck_debugLevel > 1) then
|
|
||||||
{
|
|
||||||
diag_log format["[blckeagls] missionSpawner:: (288) Mission completion criteria fulfilled: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
|
||||||
};
|
|
||||||
{
|
|
||||||
// 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.
|
|
||||||
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
|
|
||||||
[_x,_crateLoot,_lootCounts] call blck_fnc_fillBoxes;
|
|
||||||
};
|
|
||||||
}forEach _crates;
|
|
||||||
[_mines,_objects,_crates,_blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,false] call blck_fnc_endMission;
|
|
||||||
diag_log format["[blckeagls] missionSpawner:: (292)end of mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
|
||||||
|
|
@ -1,348 +0,0 @@
|
|||||||
/*
|
|
||||||
Generic Mission Spawner
|
|
||||||
for DBD Clan
|
|
||||||
By Ghostrider-DBD-
|
|
||||||
Copyright 2016
|
|
||||||
Last modified 3/18/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 ["_abort","_crates","_aiGroup","_objects","_groupPatrolRadius","_missionLandscape","_mines","_blck_AllMissionAI","_blck_localMissionMarker","_AI_Vehicles","_timeOut","_aiDifficultyLevel"];
|
|
||||||
params["_coords","_mission",["_allowReinforcements",true]];
|
|
||||||
diag_log format["_missionSpawner (18):: _allowReinforcements = %1",_allowReinforcements];
|
|
||||||
|
|
||||||
////////
|
|
||||||
// set all variables needed for the missions
|
|
||||||
// data is pulled either from the mission description or from the _mission variable passsed as a parameter
|
|
||||||
// Deal with situations where some of these variables might not be defined as well.
|
|
||||||
////////
|
|
||||||
|
|
||||||
// _mission params[_missionListOrange,_pathOrange,"OrangeMarker","orange",blck_TMin_Orange,blck_TMax_Orange];
|
|
||||||
_markerClass = _mission select 2;
|
|
||||||
_aiDifficultyLevel = _mission select 3;
|
|
||||||
|
|
||||||
if (blck_debugLevel > 0) then {diag_log format["_fnc_mainThread:: -->> _markerClass = %1",_markerClass];};
|
|
||||||
|
|
||||||
[_mission,"active",_coords] call blck_fnc_updateMissionQue;
|
|
||||||
blck_ActiveMissionCoords pushback _coords;
|
|
||||||
diag_log format["[blckeagls] missionSpawner (17):: Initializing mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
|
||||||
|
|
||||||
private["_chanceHeliPatrol","_noPara","_reinforcementLootCounts","_chanceLoot","_heliCrew","_loadCratesTiming"];
|
|
||||||
|
|
||||||
if (isNil "_markerColor") then {_markerColor = "ColorBlack"};
|
|
||||||
if (isNil "_markerType") then {_markerType = ["mil_box",[]]};
|
|
||||||
if (isNil "_timeOut") then {_timeOut = -1;};
|
|
||||||
if (isNil "_loadCratesTiming") then {_loadCratesTiming = blck_loadCratesTiming}; // valid choices are "atMissionCompletion" and "atMissionSpawn";
|
|
||||||
|
|
||||||
private["_useMines","_blck_AllMissionAI","_delayTime","_groupPatrolRadius"];
|
|
||||||
if (isNil "_useMines") then {_useMines = blck_useMines;};
|
|
||||||
|
|
||||||
_objects = [];
|
|
||||||
_mines = [];
|
|
||||||
_crates = [];
|
|
||||||
_aiGroup = [];
|
|
||||||
_missionAIVehicles = [];
|
|
||||||
_blck_AllMissionAI = [];
|
|
||||||
_AI_Vehicles = [];
|
|
||||||
_blck_localMissionMarker = [_markerClass,_coords,"","",_markerColor,_markerType];
|
|
||||||
_delayTime = 1;
|
|
||||||
_groupPatrolRadius = 50;
|
|
||||||
|
|
||||||
if (blck_labelMapMarkers select 0) then
|
|
||||||
{
|
|
||||||
//diag_log "labeling map markers *****";
|
|
||||||
_blck_localMissionMarker set [2, _markerMissionName];
|
|
||||||
};
|
|
||||||
if !(blck_preciseMapMarkers) then
|
|
||||||
{
|
|
||||||
//diag_log "Map marker will be OFFSET from the mission position";
|
|
||||||
_blck_localMissionMarker set [1,[_coords,75] call blck_fnc_randomPosition];
|
|
||||||
};
|
|
||||||
_blck_localMissionMarker set [3,blck_labelMapMarkers select 1]; // Use an arrow labeled with the mission name?
|
|
||||||
if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (91) message players and spawn a mission marker";};
|
|
||||||
[["start",_startMsg,_blck_localMissionMarker select 2]] call blck_fnc_messageplayers;
|
|
||||||
[_blck_localMissionMarker] execVM "debug\spawnMarker.sqf";
|
|
||||||
if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (94) waiting for player to trigger the mission";};
|
|
||||||
|
|
||||||
////////
|
|
||||||
// All parameters are defined, lets wait until a player is nearby or the mission has timed out
|
|
||||||
////////
|
|
||||||
|
|
||||||
private["_wait","_missionStartTime","_playerInRange","_missionTimedOut"];
|
|
||||||
_missionStartTime = diag_tickTime;
|
|
||||||
_playerInRange = false;
|
|
||||||
_missionTimedOut = false;
|
|
||||||
_wait = true;
|
|
||||||
if (blck_debugLevel > 0) then {diag_log "missionSpawner:: (105) starting mission trigger loop"};
|
|
||||||
|
|
||||||
while {_wait} do
|
|
||||||
{
|
|
||||||
//diag_log "missionSpawner:: top of mission trigger loop";
|
|
||||||
if (blck_debugLevel > 2) exitWith {_playerInRange = true;};
|
|
||||||
if ([_coords, blck_TriggerDistance, false] call blck_fnc_playerInRange) exitWith {_playerInRange = true;};
|
|
||||||
if ([_missionStartTime] call blck_fnc_timedOut) exitWith {_missionTimedOut = true;};
|
|
||||||
uiSleep 5;
|
|
||||||
//diag_log format["missionSpawner:: Trigger Loop - blck_debugLevel = %1 and _coords = %2",blck_debugLevel, _coords];
|
|
||||||
//diag_log format["missionSpawner:: Trigger Loop - players in range = %1",{isPlayer _x && _x distance2D _coords < blck_TriggerDistance} count allPlayers];
|
|
||||||
//diag_log format["missionSpawner:: Trigger Loop - timeout = %1", [_missionStartTime] call blck_fnc_timedOut];
|
|
||||||
};
|
|
||||||
|
|
||||||
if (_missionTimedOut) exitWith
|
|
||||||
{
|
|
||||||
// Deal with the case in which the mission timed out.
|
|
||||||
//["timeOut",_endMsg,_blck_localMissionMarker select 2] call blck_fnc_messageplayers;
|
|
||||||
blck_ActiveMissionCoords = blck_ActiveMissionCoords - [ _coords];
|
|
||||||
[_mission,"inactive",[0,0,0]] call blck_fnc_updateMissionQue;
|
|
||||||
[_blck_localMissionMarker select 0] call compile preprocessfilelinenumbers "debug\deleteMarker.sqf";
|
|
||||||
_blck_localMissionMarker set [1,[0,0,0]];
|
|
||||||
_blck_localMissionMarker set [2,""];
|
|
||||||
[_objects, 0.1] spawn blck_fnc_cleanupObjects;
|
|
||||||
if (blck_debugLevel > 0) then
|
|
||||||
{
|
|
||||||
diag_log format["[blckeagls] missionSpawner:: (105) Mission Timed Out: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
////////
|
|
||||||
// Spawn the mission objects, loot chest, and AI
|
|
||||||
////////
|
|
||||||
if (blck_debugLevel > 0) then
|
|
||||||
{
|
|
||||||
diag_log format["[blckeagls] missionSpawner:: (112) -- >> Mission tripped: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
|
||||||
};
|
|
||||||
|
|
||||||
if (count _missionLootBoxes > 0) then
|
|
||||||
{
|
|
||||||
_crates = [_coords,_missionCfg select 2,_loadCratesTiming] call blck_fnc_spawnMissionCrates;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_crates = [_coords,[[selectRandom blck_crateTypes,[0,0,0],_crateLoot,_lootCounts]], _loadCratesTiming] call blck_fnc_spawnMissionCrates;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
if (blck_cleanUpLootChests) then
|
|
||||||
{
|
|
||||||
_objects append _crates;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (blck_debugLevel > 0) then
|
|
||||||
{
|
|
||||||
diag_log format["[blckeagls] missionSpawner:: (136) Crates Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
|
||||||
};
|
|
||||||
private ["_temp"];
|
|
||||||
if (blck_SmokeAtMissions select 0) then // spawn a fire and smoke near the crate
|
|
||||||
{
|
|
||||||
_temp = [_coords,blck_SmokeAtMissions select 1] call blck_fnc_smokeAtCrates;
|
|
||||||
if (typeName _temp isEqualTo "ARRAY") then
|
|
||||||
{
|
|
||||||
_objects append _temp;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
uiSleep _delayTime;
|
|
||||||
if (_useMines) then
|
|
||||||
{
|
|
||||||
_mines = [_coords] call blck_fnc_spawnMines;
|
|
||||||
uiSleep _delayTime;;
|
|
||||||
};
|
|
||||||
uiSleep _delayTime;
|
|
||||||
_temp = [];
|
|
||||||
if (_missionLandscapeMode isEqualTo "random") then
|
|
||||||
{
|
|
||||||
_temp = [_coords,_missionLandscape, 3, 15, 2] call blck_fnc_spawnRandomLandscape;
|
|
||||||
} else {
|
|
||||||
_temp = [_coords, floor(random(360)),_missionLandscape,true] call blck_fnc_spawnCompositionObjects;
|
|
||||||
};
|
|
||||||
if (typeName _temp isEqualTo "ARRAY") then
|
|
||||||
{
|
|
||||||
_objects append _temp;
|
|
||||||
};
|
|
||||||
//diag_log format["_fnc_missionSpawner:: (181)->> _objects = %1",_objects];
|
|
||||||
|
|
||||||
if (blck_debugLevel > 0) then
|
|
||||||
{
|
|
||||||
diag_log format["[blckeagls] missionSpawner:: (170) Landscape spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
|
||||||
};
|
|
||||||
|
|
||||||
uiSleep _delayTime;;
|
|
||||||
|
|
||||||
[_missionLootVehicles] call blck_fnc_spawnMissionLootVehicles;
|
|
||||||
|
|
||||||
uiSleep _delayTime;
|
|
||||||
|
|
||||||
_abort = false;
|
|
||||||
_temp = [[],[],false];
|
|
||||||
_temp = [_coords, _minNoAI,_maxNoAI,_aiDifficultyLevel,_uniforms,_headGear] call blck_fnc_spawnMissionAI;
|
|
||||||
//[_coords, _minNoAI,_maxNoAI,_aiDifficultyLevel,_uniforms,_headGear] call blck_fnc_spawnMissionAI;
|
|
||||||
|
|
||||||
if (blck_debugLevel > 2) then {
|
|
||||||
diag_log format["missionSpawner :: (185) blck_fnc_spawnMissionAI returned a value of _temp = %1",_temp]; uiSleep 1;
|
|
||||||
};
|
|
||||||
|
|
||||||
_abort = _temp select 1;
|
|
||||||
if (blck_debugLevel > 2) then {
|
|
||||||
diag_log format["missionSpawner :: (190) blck_fnc_spawnMissionAI returned a value of _abort = %1",_abort]; uiSleep 1;
|
|
||||||
};
|
|
||||||
if (_abort) exitWith
|
|
||||||
{
|
|
||||||
if (blck_debugLevel > 1) then {
|
|
||||||
diag_log "missionSpawner:: (194) grpNull returned, mission termination criteria met, calling blck_fnc_endMission"
|
|
||||||
};
|
|
||||||
[_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,true] call blck_fnc_endMission;
|
|
||||||
};
|
|
||||||
if !(_abort) then
|
|
||||||
{
|
|
||||||
_blck_AllMissionAI append (_temp select 0);
|
|
||||||
};
|
|
||||||
|
|
||||||
uiSleep _delayTime;
|
|
||||||
if (blck_debugLevel > 0) then
|
|
||||||
{
|
|
||||||
diag_log format["[blckeagls] missionSpawner:: (202) AI Patrols Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
|
||||||
};
|
|
||||||
_temp = [[],[],false];
|
|
||||||
_abort = false;
|
|
||||||
if (blck_useVehiclePatrols && (_noVehiclePatrols > 0)) then
|
|
||||||
{
|
|
||||||
_temp = [_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear,_markerClass] call blck_fnc_spawnMissionVehiclePatrols;
|
|
||||||
//[_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear,_markerClass] call blck_fnc_spawnMissionVehiclePatrols;
|
|
||||||
if (blck_debugLevel > 1) then {
|
|
||||||
diag_log format["missionSpawner :: (216) blck_fnc_spawnMissionVehiclePatrols returned _temp = %1",_temp];
|
|
||||||
};
|
|
||||||
if (typeName _temp isEqualTo "ARRAY") then
|
|
||||||
{
|
|
||||||
_abort = _temp select 2;
|
|
||||||
};
|
|
||||||
if !(_abort) then
|
|
||||||
{
|
|
||||||
_objects append (_temp select 0);
|
|
||||||
_blck_AllMissionAI append (_temp select 1);
|
|
||||||
if (blck_debugLevel > 0) then
|
|
||||||
{
|
|
||||||
diag_log format["[blckeagls] missionSpawner:: (216) Vehicle Patrols Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
if (_abort) exitWith
|
|
||||||
{
|
|
||||||
if (blck_debugLevel > 0) then {
|
|
||||||
diag_log "missionSpawner:: (222) grpNull returned, mission termination criteria met, calling blck_endMission";
|
|
||||||
};
|
|
||||||
[_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,true] call blck_fnc_endMission;
|
|
||||||
};
|
|
||||||
|
|
||||||
uiSleep _delayTime;
|
|
||||||
_temp = [[],[],false];
|
|
||||||
_abort = false;
|
|
||||||
if (blck_debugLevel > 0) then {diag_log format["missionSpawner:: (234) preparing to spawn emplaced weapons for _markerClass %3:: blck_useStatic = %1 and _noEmplacedWeapons = %2",blck_useStatic,_noEmplacedWeapons,_markerClass];};
|
|
||||||
if (blck_useStatic && (_noEmplacedWeapons > 0)) then
|
|
||||||
{
|
|
||||||
_temp = [_missionEmplacedWeapons,_noEmplacedWeapons,_aiDifficultyLevel,_coords,_uniforms,_headGear] call blck_fnc_spawnEmplacedWeaponArray;
|
|
||||||
if (blck_debugLevel > 2) then
|
|
||||||
{
|
|
||||||
diag_log format ["missionSpawner:: (232) blck_fnc_spawnEmplacedWeaponArray returned _temp = %1",_temp];
|
|
||||||
};
|
|
||||||
if (typeName _temp isEqualTo "ARRAY") then
|
|
||||||
{
|
|
||||||
_abort = _temp select 2;
|
|
||||||
};
|
|
||||||
if (blck_debugLevel > 2) then
|
|
||||||
{
|
|
||||||
diag_log format ["missionSpawner:: (241) _abort = %1",_abort];
|
|
||||||
|
|
||||||
};
|
|
||||||
if !(_abort) then
|
|
||||||
{
|
|
||||||
_objects append (_temp select 0);
|
|
||||||
_blck_AllMissionAI append (_temp select 1);
|
|
||||||
if (blck_debugLevel > 0) then
|
|
||||||
{
|
|
||||||
diag_log format["[blckeagls] missionSpawner:: (253) Static Weapons Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
if (_abort) exitWith
|
|
||||||
{
|
|
||||||
if (blck_debugLevel > 2) then
|
|
||||||
{
|
|
||||||
diag_log "missionSpawner:: (261) grpNull ERROR in blck_fnc_spawnEmplacedWeaponArray, mission termination criteria met, calling blck_endMission";
|
|
||||||
};
|
|
||||||
[_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,true] call blck_fnc_endMission;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (_allowReinforcements) then
|
|
||||||
{
|
|
||||||
_weaponList = [_aiDifficultyLevel] call blck_fnc_selectAILoadout;
|
|
||||||
temp = [];
|
|
||||||
diag_log format["[blckeagls] missionSpawner:: (268) calling in reinforcements: Current mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
|
||||||
//params["_coords","_aiSkillsLevel","_weapons","_uniforms","_headgear"];
|
|
||||||
_temp = [_coords,_aiDifficultyLevel,_weaponList,_uniforms,_headGear] call blck_fnc_spawnMissionReinforcements;
|
|
||||||
if (blck_debugLevel > 2) then
|
|
||||||
{
|
|
||||||
diag_log format["missionSpawner:: _temp = %1",_temp];
|
|
||||||
};
|
|
||||||
if (typeName _temp isEqualTo "ARRAY") then
|
|
||||||
{
|
|
||||||
_abort = _temp select 2;
|
|
||||||
_objects pushback (_temp select 0);
|
|
||||||
_blck_AllMissionAI append (_temp select 1);
|
|
||||||
};
|
|
||||||
if (_abort) then
|
|
||||||
{
|
|
||||||
if (blck_debugLevel > 2) then
|
|
||||||
{
|
|
||||||
diag_log "missionSpawner:: (276) grpNul or ERROR in blck_fnc_spawnMissionReinforcements, mission termination criteria met, calling blck_endMission";
|
|
||||||
};
|
|
||||||
[_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,true] call blck_fnc_endMission;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
// Trigger for mission end
|
|
||||||
//diag_log format["[blckeagls] mission Spawner _endCondition = %1",_endCondition];
|
|
||||||
private["_missionComplete","_endIfPlayerNear","_endIfAIKilled"];
|
|
||||||
_missionComplete = -1;
|
|
||||||
_startTime = diag_tickTime;
|
|
||||||
|
|
||||||
switch (_endCondition) do
|
|
||||||
{
|
|
||||||
case "playerNear": {_endIfPlayerNear = true;_endIfAIKilled = false;};
|
|
||||||
case "allUnitsKilled": {_endIfPlayerNear = false;_endIfAIKilled = true;};
|
|
||||||
case "allKilledOrPlayerNear": {_endIfPlayerNear = true;_endIfAIKilled = true;};
|
|
||||||
};
|
|
||||||
//diag_log format["missionSpawner :: (269) _endIfPlayerNear = %1 _endIfAIKilled= %2",_endIfPlayerNear,_endIfAIKilled];
|
|
||||||
private["_locations"];
|
|
||||||
_locations = [_coords] + _crates;
|
|
||||||
|
|
||||||
//diag_log format["missionSpawner:: Waiting for player to satisfy mission end criteria of _endIfPlayerNear %1 with _endIfAIKilled %2",_endIfPlayerNear,_endIfAIKilled];
|
|
||||||
while {_missionComplete isEqualTo -1} do
|
|
||||||
{
|
|
||||||
if (blck_debugLevel isEqualTo 3) exitWith {uiSleep 300};
|
|
||||||
if ((_endIfPlayerNear) && [_coords,10,true] call blck_fnc_playerInRange) exitWith {};
|
|
||||||
if ((_endIfAIKilled) && [_blck_AllMissionAI] call blck_fnc_missionAIareDead ) exitWith {};
|
|
||||||
//diag_log format["missionSpawner:: (283) missionCompleteLoop - > players near = %1 and ai alive = %2",[_coords,20] call blck_fnc_playerInRange, {alive _x} count _blck_AllMissionAI];
|
|
||||||
uiSleep 2;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (blck_debugLevel > 1) then
|
|
||||||
{
|
|
||||||
diag_log format["[blckeagls] missionSpawner:: (288) Mission completion criteria fulfilled: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
|
||||||
};
|
|
||||||
{
|
|
||||||
// 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.
|
|
||||||
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
|
|
||||||
[_x,_crateLoot,_lootCounts] call blck_fnc_fillBoxes;
|
|
||||||
};
|
|
||||||
}forEach _crates;
|
|
||||||
[_mines,_objects,_crates,_blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,false] call blck_fnc_endMission;
|
|
||||||
diag_log format["[blckeagls] missionSpawner:: (292)end of mission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
|
||||||
|
|
@ -3,7 +3,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/11/17
|
||||||
|
|
||||||
--------------------------
|
--------------------------
|
||||||
License
|
License
|
||||||
@ -13,6 +13,7 @@
|
|||||||
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";
|
||||||
|
|
||||||
private ["_abort","_crates","_aiGroup","_objects","_groupPatrolRadius","_missionLandscape","_mines","_blck_AllMissionAI","_blck_localMissionMarker","_AI_Vehicles","_timeOut","_aiDifficultyLevel"];
|
private ["_abort","_crates","_aiGroup","_objects","_groupPatrolRadius","_missionLandscape","_mines","_blck_AllMissionAI","_blck_localMissionMarker","_AI_Vehicles","_timeOut","_aiDifficultyLevel"];
|
||||||
params["_coords","_mission",["_allowReinforcements",true]];
|
params["_coords","_mission",["_allowReinforcements",true]];
|
||||||
diag_log format["_missionSpawner (18):: _allowReinforcements = %1",_allowReinforcements];
|
diag_log format["_missionSpawner (18):: _allowReinforcements = %1",_allowReinforcements];
|
||||||
@ -246,6 +247,7 @@ if (blck_debugLevel > 0) then
|
|||||||
|
|
||||||
_temp = [[],[],false];
|
_temp = [[],[],false];
|
||||||
_abort = false;
|
_abort = false;
|
||||||
|
private["_patrolVehicles"];
|
||||||
if (blck_useVehiclePatrols && (_noVehiclePatrols > 0)) then
|
if (blck_useVehiclePatrols && (_noVehiclePatrols > 0)) then
|
||||||
{
|
{
|
||||||
_temp = [_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear,_markerClass] call blck_fnc_spawnMissionVehiclePatrols;
|
_temp = [_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear,_markerClass] call blck_fnc_spawnMissionVehiclePatrols;
|
||||||
@ -262,13 +264,13 @@ if (blck_useVehiclePatrols && (_noVehiclePatrols > 0)) then
|
|||||||
};
|
};
|
||||||
if !(_abort) then
|
if !(_abort) then
|
||||||
{
|
{
|
||||||
_objects append (_temp select 0);
|
_patrolVehicles = _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
|
||||||
{
|
{
|
||||||
diag_log format["[blckeagls] missionSpawner:: (216) Vehicle Patrols Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
diag_log format["[blckeagls] missionSpawner:: (272) Vehicle Patrols Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -277,7 +279,6 @@ if (blck_useVehiclePatrols && (_noVehiclePatrols > 0)) then
|
|||||||
|
|
||||||
if (_abort) exitWith
|
if (_abort) exitWith
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef blck_debugMode
|
#ifdef blck_debugMode
|
||||||
if (blck_debugLevel > 0) then {
|
if (blck_debugLevel > 0) then {
|
||||||
diag_log "missionSpawner:: (222) grpNull returned, mission termination criteria met, calling blck_endMission";
|
diag_log "missionSpawner:: (222) grpNull returned, mission termination criteria met, calling blck_endMission";
|
||||||
@ -323,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
|
||||||
@ -342,7 +343,7 @@ if (_abort) exitWith
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
[_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,true] call blck_fnc_endMission;
|
[_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,true,_patrolVehicles] call blck_fnc_endMission;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_allowReinforcements) then
|
if (_allowReinforcements) then
|
||||||
@ -380,7 +381,7 @@ if (_allowReinforcements) then
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
[_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,true] call blck_fnc_endMission;
|
[_mines,_objects,_crates, _blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,true,_patrolVehicles] call blck_fnc_endMission;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
// Trigger for mission end
|
// Trigger for mission end
|
||||||
@ -423,7 +424,7 @@ if (blck_debugLevel > 0) then
|
|||||||
//diag_log format["[blckeagls] missionSpawner:: (418) calling endMission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
//diag_log format["[blckeagls] missionSpawner:: (418) calling endMission: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
||||||
|
|
||||||
private["_result"];
|
private["_result"];
|
||||||
_result = [_mines,_objects,_crates,_blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,false] call blck_fnc_endMission;
|
_result = [_mines,_objects,_crates,_blck_AllMissionAI,_endMsg,_blck_localMissionMarker,_coords,_mission,false,_patrolVehicles] call blck_fnc_endMission;
|
||||||
|
|
||||||
//diag_log format["[blckeagls] missionSpawner:: (420)end of mission: blck_fnc_endMission returned value of %1","pending"];
|
//diag_log format["[blckeagls] missionSpawner:: (420)end of mission: blck_fnc_endMission returned value of %1","pending"];
|
||||||
|
|
||||||
|
@ -1,4 +1,15 @@
|
|||||||
|
|
||||||
|
/*
|
||||||
|
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["_coords","_grpPilot","_chanceLoot"];
|
params["_coords","_grpPilot","_chanceLoot"];
|
||||||
_chopperType = selectRandom blck_AIHelis;
|
_chopperType = selectRandom blck_AIHelis;
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
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";
|
||||||
|
|
||||||
params["_coords","_noVehiclePatrols","_aiDifficultyLevel","_uniforms","_headGear",["_missionType","unspecified"]];
|
params["_coords","_noVehiclePatrols","_aiDifficultyLevel","_uniforms","_headGear",["_missionType","unspecified"]];
|
||||||
|
|
||||||
#ifdef blck_debugMode
|
#ifdef blck_debugMode
|
||||||
|
@ -4,7 +4,16 @@
|
|||||||
Copyright 2016
|
Copyright 2016
|
||||||
Last modified 3/20/17
|
Last modified 3/20/17
|
||||||
checks the status of each entry in
|
checks the status of each entry in
|
||||||
|
/*
|
||||||
|
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";
|
||||||
|
|
||||||
#ifdef blck_debugMode
|
#ifdef blck_debugMode
|
||||||
if (blck_debugLevel > 0) then {
|
if (blck_debugLevel > 0) then {
|
||||||
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
for DBD Clan
|
|
||||||
By Ghostrider-DBD-
|
|
||||||
Copyright 2016
|
|
||||||
Last modified 3/19/17
|
|
||||||
checks the status of each entry in
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (blck_debugLevel > 1) then {
|
|
||||||
diag_log format["_fnc_spawnPendingMissions:: blck_pendingMissions = %1", blck_pendingMissions];
|
|
||||||
diag_log format["_fnc_spawnPendingMissions: -- >> blck_missionsRunning = %1",blck_missionsRunning];
|
|
||||||
};
|
|
||||||
if (blck_missionsRunning > blck_maxSpawnedMissions) exitWith {
|
|
||||||
if (blck_debugLevel > 1) then {
|
|
||||||
diag_log "_fnc_spawnPendingMissions:: --- >> Maximum number of missions is running; function exited without attempting to find a new mission to spawn";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
private["_coords","_missionName","_missionPath","_readyToSpawnQue","_missionToSpawn","_allowReinforcements","_selectNew","_tries"];
|
|
||||||
|
|
||||||
_selectNew = true;
|
|
||||||
_tries = 0;
|
|
||||||
while {_selectNew && (_tries < 20)} do
|
|
||||||
{
|
|
||||||
_missionToSpawn = selectRandom blck_pendingMissions;
|
|
||||||
if (blck_debugLevel > 2) then
|
|
||||||
{
|
|
||||||
diag_log format["_fnc_spawnPendingMissions: - > checking mission %1 for try %2", _missionToSpawn,_tries];
|
|
||||||
};
|
|
||||||
if (diag_tickTime > (_missionToSpawn select 6) && (_missionToSpawn select 6 > 0)) exitWith
|
|
||||||
{
|
|
||||||
if (blck_debugLevel > 2) then
|
|
||||||
{
|
|
||||||
diag_log format["_fnc_spawnPendingMissions: - > spawning mission %1", _missionToSpawn];
|
|
||||||
};
|
|
||||||
_coords = [] call blck_fnc_FindSafePosn;
|
|
||||||
_coords pushback 0;
|
|
||||||
_missionName = selectRandom (_missionToSpawn select 0);
|
|
||||||
_missionPath = _missionToSpawn select 1;
|
|
||||||
_allowReinforcements = _missionToSpawn select 8;
|
|
||||||
[_coords,_missionToSpawn,_allowReinforcements] execVM format["\q\addons\custom_server\Missions\%1\%2.sqf",_missionPath,_missionName];
|
|
||||||
blck_missionsRunning = blck_missionsRunning + 1;
|
|
||||||
};
|
|
||||||
_tries = _tries + 1;
|
|
||||||
};
|
|
||||||
|
|
||||||
true
|
|
@ -1,6 +1,16 @@
|
|||||||
/*
|
/*
|
||||||
|
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"];
|
||||||
|
|
||||||
|
@ -12,8 +12,15 @@
|
|||||||
blck_timeAccelerationDay = 1; // Daytime time accelearation
|
blck_timeAccelerationDay = 1; // Daytime time accelearation
|
||||||
blck_timeAccelerationDusk = 3; // Dawn/dusk time accelearation
|
blck_timeAccelerationDusk = 3; // Dawn/dusk time accelearation
|
||||||
blck_timeAccelerationNight = 6; // Nighttim time acceleration
|
blck_timeAccelerationNight = 6; // Nighttim time acceleration
|
||||||
|
--------------------------
|
||||||
|
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";
|
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
|
||||||
|
|
||||||
private ["_arr","_sunrise","_sunset","_time"];
|
private ["_arr","_sunrise","_sunset","_time"];
|
||||||
_arr = date call BIS_fnc_sunriseSunsetTime;
|
_arr = date call BIS_fnc_sunriseSunsetTime;
|
||||||
_sunrise = _arr select 0;
|
_sunrise = _arr select 0;
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
|
|
||||||
|
Deals with instances in which a unit is damaged (not in use).
|
||||||
|
By Ghostrider-DbD-
|
||||||
|
Last modified 4-11-17
|
||||||
|
|
||||||
unit: Object - Object the event handler is assigned to.
|
unit: Object - Object the event handler is assigned to.
|
||||||
selectionName: String - Name of the selection where the unit was damaged. "" for over-all structural damage, "?" for unknown selections.
|
selectionName: String - Name of the selection where the unit was damaged. "" for over-all structural damage, "?" for unknown selections.
|
||||||
@ -10,7 +13,14 @@
|
|||||||
(Since Arma 3 v 1.49.131802)
|
(Since Arma 3 v 1.49.131802)
|
||||||
|
|
||||||
hitPartIndex: Number - Hit part index of the hit point, -1 otherwise.
|
hitPartIndex: Number - Hit part index of the hit point, -1 otherwise.
|
||||||
|
--------------------------
|
||||||
|
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 ["_unit","_killer","_group","_deleteAI_At"];
|
private ["_unit","_killer","_group","_deleteAI_At"];
|
||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
|
@ -1,7 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
By Ghostrider-DbD-
|
By Ghostrider-DbD-
|
||||||
Last Modified 3-12-17
|
Last Modified 3-12-17
|
||||||
|
|
||||||
|
Handles the case where a unit is hit.
|
||||||
|
|
||||||
|
--------------------------
|
||||||
|
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 ["_unit","_instigator","_group","_wp"];
|
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;
|
||||||
|
@ -1,4 +1,18 @@
|
|||||||
|
|
||||||
|
/*
|
||||||
|
Killed handler for _units
|
||||||
|
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";
|
||||||
|
|
||||||
params["_unit","_killer"];
|
params["_unit","_killer"];
|
||||||
|
|
||||||
//diag_log format["EH_AIKilled:: _units = %1 and _killer = %2",_unit,_killer];
|
//diag_log format["EH_AIKilled:: _units = %1 and _killer = %2",_unit,_killer];
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
/*
|
/*
|
||||||
|
|
||||||
|
Handle case where a unit reloads weapon.
|
||||||
|
This was used in place of fired event handlers to add realism and deal with issues with the arma engine post v1.64
|
||||||
|
By Ghostrider-DbD-
|
||||||
|
Last modified 4-11-17
|
||||||
|
|
||||||
https://community.bistudio.com/wiki/Arma_3:_Event_Handlers/Reloaded
|
https://community.bistudio.com/wiki/Arma_3:_Event_Handlers/Reloaded
|
||||||
|
|
||||||
The EH returns array in _this variable of the following format [entity, weapon, muzzle, newMagazine, (oldMagazine)], where:
|
The EH returns array in _this variable of the following format [entity, weapon, muzzle, newMagazine, (oldMagazine)], where:
|
||||||
@ -13,7 +18,14 @@
|
|||||||
magazineID: Number - global magazine id
|
magazineID: Number - global magazine id
|
||||||
magazineCreator: Number - owner of the magazine creator
|
magazineCreator: Number - owner of the magazine creator
|
||||||
|
|
||||||
|
--------------------------
|
||||||
|
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 ["_unit","_mag"];
|
//private ["_unit","_mag"];
|
||||||
//_unit = _this select 0;
|
//_unit = _this select 0;
|
||||||
|
@ -1,8 +1,16 @@
|
|||||||
/*
|
/*
|
||||||
by Ghostrider
|
by Ghostrider
|
||||||
4-5-17
|
4-5-17
|
||||||
|
Alerts the leader of a group of the location of an enemy.
|
||||||
|
|
||||||
|
--------------------------
|
||||||
|
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["_knowsAbout","_intelligence","_group"];
|
private["_knowsAbout","_intelligence","_group"];
|
||||||
params["_unit","_target"];
|
params["_unit","_target"];
|
||||||
|
@ -1,8 +1,16 @@
|
|||||||
/*
|
/*
|
||||||
by Ghostrider
|
by Ghostrider
|
||||||
9-20-15
|
9-20-15
|
||||||
Because this is p-ecompiled there is less concern about keeping comments in.
|
Allerts all units within a certain radius of the location of a killer.
|
||||||
|
** Not in use at this time; reserved for the future **
|
||||||
|
--------------------------
|
||||||
|
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["_alertDist","_intelligence"];
|
private["_alertDist","_intelligence"];
|
||||||
params["_unit","_killer"];
|
params["_unit","_killer"];
|
||||||
|
@ -2,9 +2,18 @@
|
|||||||
Delete alive AI.
|
Delete alive AI.
|
||||||
Now called from the main thread which tracks the time elapsed so that we no longer spawn a wait timer for each completed mission.
|
Now called from the main thread which tracks the time elapsed so that we no longer spawn a wait timer for each completed mission.
|
||||||
by Ghostrider
|
by Ghostrider
|
||||||
Last updated 1/24/17
|
Last updated 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";
|
||||||
|
|
||||||
|
/*
|
||||||
_fn_deleteAIfromList = {
|
_fn_deleteAIfromList = {
|
||||||
params["_aiList"];
|
params["_aiList"];
|
||||||
#ifdef blck_debugMode
|
#ifdef blck_debugMode
|
||||||
@ -23,7 +32,7 @@ _fn_deleteAIfromList = {
|
|||||||
#ifdef blck_debugMode
|
#ifdef blck_debugMode
|
||||||
if (blck_debugLevel > 1) then {diag_log format["_fnc_cleanupAliveAI called at %1",diag_tickTime];};
|
if (blck_debugLevel > 1) then {diag_log format["_fnc_cleanupAliveAI called at %1",diag_tickTime];};
|
||||||
#endif
|
#endif
|
||||||
|
*/
|
||||||
for "_i" from 1 to (count blck_liveMissionAI) do
|
for "_i" from 1 to (count blck_liveMissionAI) do
|
||||||
{
|
{
|
||||||
if ((_i) <= count blck_liveMissionAI) then
|
if ((_i) <= count blck_liveMissionAI) then
|
||||||
@ -37,10 +46,14 @@ 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];
|
||||||
if (vehicle _x != _x) then // mark the vehicle for deletion
|
diag_log format["_fnc_cleanupAliveAI:: objectParent _x = %1",objectParent _x];
|
||||||
|
/*
|
||||||
|
if ((alive _x) && !(isNull objectParent _x)) then // mark the vehicle for deletion
|
||||||
{
|
{
|
||||||
(vehicle _x) setVariable["blck_DeleteAt",diag_tickTime];
|
(vehicle _x) setVariable["blck_DeleteAt",diag_tickTime];
|
||||||
|
diag_log format["_fnc_cleanupAliveAI:: deleteAt for vehicle _x = %1",(vehicle _x) getVariable["blck_DeleteAt",0]];
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
[_x] call blck_fnc_deleteAI;
|
[_x] call blck_fnc_deleteAI;
|
||||||
}forEach (_units select 0);
|
}forEach (_units select 0);
|
||||||
uiSleep 0.1;
|
uiSleep 0.1;
|
||||||
|
@ -2,7 +2,14 @@
|
|||||||
Delete Dead AI and nearby weapons after an appropriate period.
|
Delete Dead AI and nearby weapons after an appropriate period.
|
||||||
by Ghostrider
|
by Ghostrider
|
||||||
Last updated 1/24/17
|
Last updated 1/24/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
|
#ifdef blck_debugMode
|
||||||
if (blck_debugLevel > 1) then {diag_log format["fnc_cleanupDeadAI called at time %1",diag_tickTime];};
|
if (blck_debugLevel > 1) then {diag_log format["fnc_cleanupDeadAI called at time %1",diag_tickTime];};
|
||||||
|
@ -2,7 +2,14 @@
|
|||||||
Delete a unit.
|
Delete a unit.
|
||||||
by Ghostrider
|
by Ghostrider
|
||||||
Last updated 1/22/17
|
Last updated 1/22/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["_ai","_group"];
|
private["_ai","_group"];
|
||||||
params["_unit"];
|
params["_unit"];
|
||||||
|
@ -3,7 +3,14 @@
|
|||||||
Last Modified 3/23/17
|
Last Modified 3/23/17
|
||||||
By Ghostrider-DBD-
|
By Ghostrider-DBD-
|
||||||
Copyright 2016
|
Copyright 2016
|
||||||
|
--------------------------
|
||||||
|
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","_isLegal","_weapon","_lastkill","_kills","_message","_killstreakMsg"];
|
private["_group","_isLegal","_weapon","_lastkill","_kills","_message","_killstreakMsg"];
|
||||||
params["_unit","_killer","_isLegal"];
|
params["_unit","_killer","_isLegal"];
|
||||||
|
@ -1,7 +1,14 @@
|
|||||||
/*
|
/*
|
||||||
by Ghostrider
|
by Ghostrider
|
||||||
1-22-17
|
1-22-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["_missionType","_wasRunover","_launcher","_legal"];
|
private["_missionType","_wasRunover","_launcher","_legal"];
|
||||||
params["_unit","_killer"];
|
params["_unit","_killer"];
|
||||||
|
@ -1,3 +1,16 @@
|
|||||||
|
/*
|
||||||
|
Remove all gear from an AI _unit
|
||||||
|
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["_unit"];
|
params["_unit"];
|
||||||
|
|
||||||
removeVest _unit;
|
removeVest _unit;
|
||||||
|
@ -1,7 +1,15 @@
|
|||||||
/*
|
/*
|
||||||
by Ghostrider
|
by Ghostrider
|
||||||
1-22-17
|
1-22-17
|
||||||
|
Removes an AI launcher and ammo
|
||||||
|
--------------------------
|
||||||
|
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["_launcher","_launcherRounds"];
|
private["_launcher","_launcherRounds"];
|
||||||
params["_unit"]; // = _this select 0;
|
params["_unit"]; // = _this select 0;
|
||||||
|
@ -1,7 +1,16 @@
|
|||||||
/*
|
/*
|
||||||
by Ghostrider
|
by Ghostrider
|
||||||
8-13-16
|
8-13-16
|
||||||
|
Remove NVG from AI
|
||||||
|
--------------------------
|
||||||
|
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["_unit"];
|
params["_unit"];
|
||||||
//diag_log format["+--+ removing NVG for unit %1",_unit];
|
//diag_log format["+--+ removing NVG for unit %1",_unit];
|
||||||
|
|
||||||
|
@ -4,7 +4,14 @@
|
|||||||
Code fragment adapted from VEMF
|
Code fragment adapted from VEMF
|
||||||
call as [_unit,_killer] call blck_fnc_rewardKiller;
|
call as [_unit,_killer] call blck_fnc_rewardKiller;
|
||||||
Last modified 1/22/17
|
Last modified 1/22/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["_unit","_killer","_kills"];
|
params["_unit","_killer","_kills"];
|
||||||
//diag_log format["rewardKiller:: _unit = %1 and _killer %2",_unit,_killer];
|
//diag_log format["rewardKiller:: _unit = %1 and _killer %2",_unit,_killer];
|
||||||
|
@ -2,7 +2,14 @@
|
|||||||
Set skills for an AI Unit
|
Set skills for an AI Unit
|
||||||
by Ghostrider
|
by Ghostrider
|
||||||
Last updated 8/14/16
|
Last updated 8/14/16
|
||||||
|
--------------------------
|
||||||
|
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";
|
||||||
|
|
||||||
// Self explanatory
|
// Self explanatory
|
||||||
// [_group, _skill] call blck_setSkill;
|
// [_group, _skill] call blck_setSkill;
|
||||||
|
@ -4,7 +4,14 @@
|
|||||||
Logic for adding AI Ammo, GL Shells and Attachments addapted from that by Buttface (A3XAI).
|
Logic for adding AI Ammo, GL Shells and Attachments addapted from that by Buttface (A3XAI).
|
||||||
Everything having to do with spawning and configuring an AI should happen here
|
Everything having to do with spawning and configuring an AI should happen here
|
||||||
Last Modified 1/22/17
|
Last Modified 1/22/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";
|
||||||
|
|
||||||
//Defines private variables so they don't interfere with other scripts
|
//Defines private variables so they don't interfere with other scripts
|
||||||
private ["_i","_weap","_skin","_ai1","_skillLevel","_aiSkills",
|
private ["_i","_weap","_skin","_ai1","_skillLevel","_aiSkills",
|
||||||
|
@ -5,7 +5,14 @@
|
|||||||
By Ghostrider-DBD-
|
By Ghostrider-DBD-
|
||||||
Copyright 2016
|
Copyright 2016
|
||||||
Last updated 3-24-17
|
Last updated 3-24-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["_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_missionVehicles];
|
||||||
|
@ -3,7 +3,15 @@
|
|||||||
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;
|
||||||
|
@ -164,11 +164,46 @@ if !(isNull _grpPilot) then
|
|||||||
{
|
{
|
||||||
[_coords,_skillAI,_weapons,_uniforms,_headGear,_grpParatroops,_patrolHeli] call blck_fnc_spawnMissionParatroops;
|
[_coords,_skillAI,_weapons,_uniforms,_headGear,_grpParatroops,_patrolHeli] call blck_fnc_spawnMissionParatroops;
|
||||||
};
|
};
|
||||||
//set waypoint for helicopter
|
|
||||||
// params["_pos","_minDis","_maxDis","_grpPilot",["_mode","random"],["_pattern",["MOVE","SAD"]]];
|
|
||||||
//[_coords,2,10,_grpPilot,"random",["MOVE","SENTRY"]] call blck_fnc_setupWaypoints;
|
|
||||||
private["_wpDestination"];
|
|
||||||
|
|
||||||
|
//set waypoint for helicopter
|
||||||
|
private["_wpDestination"];
|
||||||
|
//set waypoint for helicopter
|
||||||
|
// 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
|
for "_i" from 1 to 5 do
|
||||||
{
|
{
|
||||||
_pos = _coords getPos [15 + random (15), random(360)];
|
_pos = _coords getPos [15 + random (15), random(360)];
|
||||||
@ -193,6 +228,7 @@ if !(isNull _grpPilot) then
|
|||||||
_wp = _grpPilot addWaypoint [_coords,25];
|
_wp = _grpPilot addWaypoint [_coords,25];
|
||||||
_wp setWaypointType "CYCLE";
|
_wp setWaypointType "CYCLE";
|
||||||
_grpPilot setCurrentWaypoint [_grpPilot,0];
|
_grpPilot setCurrentWaypoint [_grpPilot,0];
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef blck_debugMode
|
#ifdef blck_debugMode
|
||||||
if (blck_debugLevel > 2) then
|
if (blck_debugLevel > 2) then
|
||||||
|
@ -8,7 +8,16 @@
|
|||||||
_lootCounts,
|
_lootCounts,
|
||||||
_lootSetting // [blue, red, green, orange]
|
_lootSetting // [blue, red, green, orange]
|
||||||
] call blck_spawnHeliParaCrate
|
] call blck_spawnHeliParaCrate
|
||||||
|
|
||||||
|
** here for future usage **
|
||||||
|
--------------------------
|
||||||
|
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["_supplyHeli","_lootCounts"];
|
params["_supplyHeli","_lootCounts"];
|
||||||
|
|
||||||
|
@ -8,8 +8,15 @@
|
|||||||
--------------------------
|
--------------------------
|
||||||
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons 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/
|
||||||
|
--------------------------
|
||||||
|
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/
|
http://creativecommons.org/licenses/by-nc-sa/4.0/
|
||||||
*/
|
*/
|
||||||
|
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
|
||||||
|
|
||||||
params["_missionPos","_paraGroup","_numAI","_skillAI","_weapons","_uniforms","_headGear",["_heli",objNull]];
|
params["_missionPos","_paraGroup","_numAI","_skillAI","_weapons","_uniforms","_headGear",["_heli",objNull]];
|
||||||
private["_arc","_dir","_spawnPos","_chute","_unit","_launcherType","_aborted"];
|
private["_arc","_dir","_spawnPos","_chute","_unit","_launcherType","_aborted"];
|
||||||
|
@ -1,102 +0,0 @@
|
|||||||
/*
|
|
||||||
By Ghostrider-DBD-
|
|
||||||
Copyright 2016
|
|
||||||
Last updated 3-17-17
|
|
||||||
|
|
||||||
spawns a vehicle of _vehType and mans it with units in _group.
|
|
||||||
returns _veh, the vehicle spawned.
|
|
||||||
--------------------------
|
|
||||||
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["_vehType","_safepos","_veh"];
|
|
||||||
params["_center","_pos",["_vehType","I_G_Offroad_01_armed_F"],["_minDis",30],["_maxDis",45],["_group",grpNull]];
|
|
||||||
|
|
||||||
|
|
||||||
//_center Center of the mission area - this is usuall the position treated as the center by the mission spawner. Vehicles will patrol the perimeter of the mission area.
|
|
||||||
// _pos the approximate spawn point for the vehicle
|
|
||||||
//_vehType = [_this,1,"I_G_Offroad_01_armed_F"] call BIS_fnc_param;
|
|
||||||
//_minDis = minimum 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
|
|
||||||
|
|
||||||
if (blck_debugLevel > 2) then
|
|
||||||
{
|
|
||||||
diag_log format["_fnc_spawnVehiclePatrol:: _center = %1 | _pos = %2 | _vehType = %3 | _group = %4",_center,_pos,_vehType,_group];
|
|
||||||
};
|
|
||||||
|
|
||||||
if !(isNull _group) then
|
|
||||||
{ // exitWith {diag_log "[blckeagls] ERROR CONDITION:-->> NULL-GROUP Provided to _fnc_spawnVehiclePatrol"; objNull;};
|
|
||||||
_veh = [_vehType,_pos] call blck_fnc_spawnVehicle;
|
|
||||||
|
|
||||||
if (blck_debugLevel > 2) then
|
|
||||||
{
|
|
||||||
diag_log format["spawnVehiclePatrol:: vehicle spawned is %1 of typeof %2",_veh, typeOf _veh];
|
|
||||||
};
|
|
||||||
private["_unitNumber"];
|
|
||||||
_unitNumber = 0;
|
|
||||||
|
|
||||||
{
|
|
||||||
switch (_unitNumber) do
|
|
||||||
{
|
|
||||||
case 0: {_x moveingunner _veh;};
|
|
||||||
case 1: {_x moveindriver _veh;};
|
|
||||||
default {_x moveInCargo _veh;};
|
|
||||||
};
|
|
||||||
_unitNumber = _unitNumber + 1;
|
|
||||||
}forEach (units _group);
|
|
||||||
|
|
||||||
while {(count (waypoints _group)) > 0} do
|
|
||||||
{
|
|
||||||
deleteWaypoint ((waypoints _group) select 0);
|
|
||||||
};
|
|
||||||
|
|
||||||
// params["_pos","_minDis","_maxDis","_group",["_mode","random"],["_pattern",["MOVE","SAD"]]];
|
|
||||||
// [_pos,_minDist,_maxDist,_groupSpawned,"random",["SAD"]] spawn blck_fnc_setupWaypoints;
|
|
||||||
[_center,_minDist,_maxDist,_groupSpawned,"random",["MOVE","SENTRY"]] spawn blck_fnc_setupWaypoints;
|
|
||||||
/*
|
|
||||||
_count = 5;
|
|
||||||
_start = _center getDir _pos;
|
|
||||||
_angle = _start;
|
|
||||||
_sign = selectRandom [1, -1];
|
|
||||||
_arc = _sign * 360/_count;
|
|
||||||
for "_i" from 1 to _count do
|
|
||||||
{
|
|
||||||
_angle = _angle + _arc;
|
|
||||||
_p2 = _center getPos [(_minDis + random(_maxDis - _minDis)),_angle];
|
|
||||||
|
|
||||||
|
|
||||||
if (_i isEqualTo 1) then
|
|
||||||
{
|
|
||||||
_wp = [_group, 0];
|
|
||||||
_wp setWaypointPosition [_p2, 25];
|
|
||||||
} else {
|
|
||||||
_wp = _group addWaypoint [_p2, 25];
|
|
||||||
};
|
|
||||||
_wp setWaypointType "MOVE";
|
|
||||||
_wp setWaypointName "move";
|
|
||||||
_wp setWaypointBehaviour "COMBAT";
|
|
||||||
_wp setWaypointCombatMode "RED";
|
|
||||||
_wp setWaypointTimeout [1,1.1,1.2];
|
|
||||||
_wp = _group addWaypoint [_p2, 25];
|
|
||||||
_wp setWaypointType "SENTRY";
|
|
||||||
_wp setWaypointName "sentry";
|
|
||||||
_wp setWaypointBehaviour "COMBAT";
|
|
||||||
_wp setWaypointCombatMode "RED";
|
|
||||||
_wp setWaypointTimeout [10,17.5,25];
|
|
||||||
*/
|
|
||||||
};
|
|
||||||
_wp = _group addWaypoint [_pos, 25];
|
|
||||||
_wp setWaypointType "CYCLE";
|
|
||||||
_group setVariable["wpIndex",0];
|
|
||||||
};
|
|
||||||
if (blck_debugLevel > 1) then
|
|
||||||
{
|
|
||||||
diag_log format["_fnc_spawnVehiclePatrol::->> _veh = %1",_veh];
|
|
||||||
};
|
|
||||||
_veh
|
|
@ -3,78 +3,70 @@
|
|||||||
Allows players to enter and use the vehicle when appropriate
|
Allows players to enter and use the vehicle when appropriate
|
||||||
or otherwise destroys the vehicle.
|
or otherwise destroys the vehicle.
|
||||||
|
|
||||||
|
Logic:
|
||||||
|
1) Mission ended; players can keep vehicles BUT not all vehicle AI were killed - > delete vehicle when live AI are killed;
|
||||||
|
2) Vehicle has a blck_deleteAT timer set - > delete vehicle;
|
||||||
|
3) All AI killed an players may NOT keep vehicles - > detroy vehicle
|
||||||
|
4) All AI Killed and players MAY keep vehicles -> release vehicle
|
||||||
|
5) vehicle ammo low AND vehicle gunner is alive - > reloaded
|
||||||
|
|
||||||
By Ghostrider-DBD-
|
By Ghostrider-DBD-
|
||||||
Copyright 2016
|
Copyright 2016
|
||||||
Last updated 1-22-17
|
Last updated 1-22-17
|
||||||
*/
|
|
||||||
|
|
||||||
private ["_veh","_vehList"];
|
--------------------------
|
||||||
_vehList = blck_missionVehicles;
|
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";
|
||||||
|
|
||||||
|
_fn_removeVehicleFromVehicleMonitoring = {
|
||||||
|
params["_veh"];
|
||||||
|
blck_missionVehicles = blck_missionVehicles - [_veh];
|
||||||
|
};
|
||||||
|
|
||||||
_fn_releaseVehicle = {
|
_fn_releaseVehicle = {
|
||||||
params["_v"];
|
params["_v"];
|
||||||
//diag_log format["vehicleMonitor.sqf: make vehicle available to players; stripping eventHandlers from _v %1",_v];
|
//diag_log format["vehicleMonitor.sqf: make vehicle available to players; stripping eventHandlers from _v %1",_v];
|
||||||
blck_missionVehicles = blck_missionVehicles - [_v];
|
[_v] call _fn_removeVehicleFromVehicleMonitoring;
|
||||||
_v removealleventhandlers "GetIn";
|
|
||||||
_v removealleventhandlers "GetOut";
|
|
||||||
_v setVehicleLock "UNLOCKED" ;
|
_v setVehicleLock "UNLOCKED" ;
|
||||||
_v setVariable["releasedToPlayers",true];
|
//_v setVariable["releasedToPlayers",true];
|
||||||
[_v] call blck_fnc_emptyObject;
|
[_v] call blck_fnc_emptyObject;
|
||||||
{
|
{
|
||||||
_v removealleventhandlers _x;
|
_v removealleventhandlers _x;
|
||||||
}forEach["fired","hit","hitpart","reloaded","dammaged","HandleDamage"];
|
} forEach ["GetIn","GetOut","fired","hit","hitpart","reloaded","dammaged","HandleDamage"];
|
||||||
|
|
||||||
|
#ifdef blck_debugMode
|
||||||
if (blck_debugLevel > 2) then
|
if (blck_debugLevel > 2) 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
|
||||||
};
|
};
|
||||||
*/
|
|
||||||
//if (blck_debugLevel > 1) then {diag_log format["_fnc_vehicleMonitor:: function called at %1",diag_tickTime];};
|
_fn_deleteAIvehicle = {
|
||||||
{
|
params["_veh"];
|
||||||
_veh = _x;
|
|
||||||
if (_veh getVariable["blck_DeleteAt",0] > 0) then
|
|
||||||
{
|
|
||||||
if (diag_tickTime > (_veh getVariable["blck_DeleteAt",0])) then
|
|
||||||
{
|
|
||||||
{
|
{
|
||||||
_veh removeAllEventHandlers _x;
|
_veh removeAllEventHandlers _x;
|
||||||
}forEach ["Hit","HitPart","GetIn","GetOut","Fired","FiredNear"];
|
}forEach ["Hit","HitPart","GetIn","GetOut","Fired","FiredNear"];
|
||||||
|
[_veh] call _fn_removeVehicleFromVehicleMonitoring;
|
||||||
deleteVehicle _veh;
|
deleteVehicle _veh;
|
||||||
blck_missionVehicles = blck_missionVehicles - [_veh];
|
|
||||||
};
|
};
|
||||||
} else {
|
|
||||||
if ({alive _x} count crew _veh < 1) then
|
|
||||||
{
|
|
||||||
if (_veh getVariable["DBD_vehType","none"] isEqualTo "emplaced") then // Deal with a static weapon
|
|
||||||
{
|
|
||||||
if (blck_killEmptyStaticWeapons) then
|
|
||||||
{
|
|
||||||
//if (blck_debugLevel > 2) then {diag_log format["_fnc_vehicleMonitor:: case of destroyed where vehicle = %1",_veh];};
|
|
||||||
_veh setDamage 1;
|
|
||||||
_veh setVariable["blck_DeleteAt",diag_tickTime + 60];
|
|
||||||
} else {
|
|
||||||
[_veh] call blck_fnc_releaseVehicleToPlayers;
|
|
||||||
};
|
|
||||||
}else { // Deal with vehicles
|
|
||||||
if (blck_killEmptyAIVehicles) then
|
|
||||||
{
|
|
||||||
//if (blck_debugLevel > 2) then {diag_log format["_fnc_vehicleMonitor:: case of patrol vehicle destroyed where vehicle = %1",_veh];};
|
|
||||||
{
|
|
||||||
_veh setHitPointDamage [_x, 1];
|
|
||||||
|
|
||||||
} forEach ["HitLFWheel","HitLF2Wheel","HitRFWheel","HitRF2Wheel","HitEngine","HitLBWheel","HitLMWheel","HitRBWheel","HitRMWheel","HitTurret","HitGun","HitTurret","HitGun","HitTurret","HitGun","HitTurret","HitGun"];
|
_fn_destroyVehicleAndCrew = {
|
||||||
_veh setVariable["blck_DeleteAt",diag_tickTime + 60];
|
params["_veh"];
|
||||||
} else {
|
private["_crew"];
|
||||||
if (blck_debugLevel > 0) then {diag_log format["_fnc_vehicleMonitor:: case of release vehicle = %1 to player with blck_missionVehicles = %2",_veh, blck_missionVehicles];};
|
_crew = crew _veh;
|
||||||
blck_missionVehicles = blck_missionVehicles - [_veh];
|
{[_x] call blck_fnc_deleteAI;} forEach _crew;
|
||||||
if (blck_debugLevel > 0) then {diag_log format["_fnc_vehicleMonitor:: blck_missionVehicles updated to %1", blck_missionVehicles];};
|
[_veh] call _fn_deleteAIvehicle;
|
||||||
[_veh] call blck_fnc_releaseVehicleToPlayers;
|
|
||||||
};
|
};
|
||||||
};
|
|
||||||
} else { // Add magazine to vehicle if possible
|
_fn_reloadAmmo = {
|
||||||
|
params["_veh"];
|
||||||
private ["_crew","_mag","_allMags","_cnt"];
|
private ["_crew","_mag","_allMags","_cnt"];
|
||||||
//_veh setVehicleAmmo 1;
|
|
||||||
//_veh setFuel 1;
|
|
||||||
// https://community.bistudio.com/wiki/fullCrew
|
// https://community.bistudio.com/wiki/fullCrew
|
||||||
// 0 1 2 3 4
|
// 0 1 2 3 4
|
||||||
// returns Array - format [[<Object>unit,<String>role,<Number>cargoIndex,<Array>turretPath,<Boolean>personTurret], ...]
|
// returns Array - format [[<Object>unit,<String>role,<Number>cargoIndex,<Array>turretPath,<Boolean>personTurret], ...]
|
||||||
@ -99,6 +91,80 @@ _fn_releaseVehicle = {
|
|||||||
} forEach _crew;
|
} forEach _crew;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private ["_veh","_vehList"];
|
||||||
|
_vehList = blck_missionVehicles;
|
||||||
|
|
||||||
|
#ifdef blck_debugMode
|
||||||
|
if (blck_debugLevel > 1) then {diag_log format["_fnc_vehicleMonitor:: function called at %1",diag_tickTime];};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
{
|
||||||
|
_veh = _x; // (purely for clarity at this point, _x could be used just as well)
|
||||||
|
private["_evaluate"];
|
||||||
|
_evaluate = true;
|
||||||
|
// Case where vehicle has been marked for deletion after a certain time.
|
||||||
|
if ( (_veh getVariable["blck_DeleteAt",0] > 0) && (diag_tickTime > _veh getVariable "blck_DeleteAt")) then
|
||||||
|
{
|
||||||
|
[_veh] call _fn_destroyVehicleAndCrew;
|
||||||
|
_evaluate = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Case where is an emplaced / static wweapon and has no alive crew and such vehicles should be 'killed' or release to players
|
||||||
|
if (_evaluate) then
|
||||||
|
{
|
||||||
|
if ( (_veh getVariable["DBD_vehType","none"] isEqualTo "emplaced") && {alive _x} count crew _veh isEqualTo 0) then
|
||||||
|
{
|
||||||
|
if (blck_killEmptyStaticWeapons) then
|
||||||
|
{
|
||||||
|
#ifdef blck_debugMode
|
||||||
|
if (blck_debugLevel > 2) then {diag_log format["_fnc_vehicleMonitor:: case of destroyed where vehicle = %1",_veh];};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
_veh setDamage 1;
|
||||||
|
_veh setVariable["blck_DeleteAt",diag_tickTime + 60];
|
||||||
|
}else {
|
||||||
|
[_veh] call _fn_releaseVehicle;
|
||||||
|
};
|
||||||
|
_evaluate = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
// Case where a vehicle is NOT an emplaced / static weapon and has no alive crew and such vehicles should be 'killed' or release to players
|
||||||
|
if (_evaluate) then
|
||||||
|
{
|
||||||
|
if (_veh getVariable["DBD_vehType","none"] isEqualTo "none" && ({alive _x} count crew _veh isEqualTo 0) ) then
|
||||||
|
{
|
||||||
|
if (blck_killEmptyAIVehicles) then
|
||||||
|
{
|
||||||
|
_veh setDamage 0.7;
|
||||||
|
_veh setVariable["blck_DeleteAt",diag_tickTime + 60];
|
||||||
|
} else {
|
||||||
|
[_veh] call _fn_releaseVehicle;
|
||||||
|
};
|
||||||
|
_evaluate = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
// Case where a vehicle is part of a mission that has been completed and containes live AI.
|
||||||
|
if (_evaluate) then
|
||||||
|
{
|
||||||
|
if ( _veh getVariable["missionCompleted",0] > 0 && ({alive _x} count crew _veh > 0)) then
|
||||||
|
{
|
||||||
|
private["_cleanupTimer"];
|
||||||
|
_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
|
||||||
|
if (diag_tickTime > (_cleanupTimer + (_veh getVariable["missionCompleted",0])) ) then
|
||||||
|
{
|
||||||
|
[_veh] call _fn_destroyVehicleAndCrew;
|
||||||
|
_evaluate = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_evaluate) then
|
||||||
|
{
|
||||||
|
[_veh] call _fn_reloadAmmo;
|
||||||
};
|
};
|
||||||
}forEach _vehList;
|
}forEach _vehList;
|
||||||
|
|
||||||
|
@ -4,11 +4,14 @@ 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 50
|
4/6/17 Version 6.58 Build 53
|
||||||
[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 reverted to that from Build 46.
|
||||||
[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.
|
||||||
|
[Issues] Throws errors when evaluating errors related to certain disallowed types of kills.
|
||||||
|
|
||||||
3/23/17 Verision 6.58 build 48
|
3/23/17 Verision 6.58 build 48
|
||||||
Turned debugging off
|
Turned debugging off
|
||||||
|
@ -1,3 +1,15 @@
|
|||||||
|
/*
|
||||||
|
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 51";
|
_blck_version = "6.58 Build 53";
|
||||||
_blck_versionDate = "4-10-17 8:00 PM";
|
_blck_versionDate = "4-11-17 8:00 PM";
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Blckegls mission system Ver 6.58
|
Blckegls mission system Ver 6.58
|
||||||
|
|
||||||
Build 50
|
Build 53
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user