Bug Fixes, Coding Updates
Added new 'reloaded' event handler to AI Added checks for mags for vehicle mounted weapons to GMS_fnc_vehicleMonitor so AI can reload rather than just having infinite ammo changed some distance to distance2D to try to solve issues with certain mission triggers failing.
This commit is contained in:
parent
dadc74aa28
commit
1f335c745b
@ -5,7 +5,7 @@
|
||||
for DBD Clan
|
||||
By Ghostrider-DBD-
|
||||
Copyright 2016
|
||||
Last Modified 11-16-16
|
||||
Last Modified 1-22-17
|
||||
*/
|
||||
private["_findNew","_coords","_blackListCenter","_blackListRadius","_dist","_xpos","_ypos","_newPos","_townPos"];
|
||||
|
||||
@ -19,13 +19,13 @@ while {_findNew} do {
|
||||
//diag_log format["<<--->> _coords = %1",_coords];
|
||||
|
||||
{
|
||||
if ((_x distance _coords) < blck_MinDistanceFromMission) then {
|
||||
if ((_x distance2D _coords) < blck_MinDistanceFromMission) then {
|
||||
_FindNew = true;
|
||||
};
|
||||
}forEach DBD_HeliCrashSites;
|
||||
|
||||
{
|
||||
if ( ((_x select 0) distance _coords) < (_x select 1)) exitWith
|
||||
if ( ((_x select 0) distance2D _coords) < (_x select 1)) exitWith
|
||||
{
|
||||
_FindNew = true;
|
||||
};
|
||||
@ -34,7 +34,7 @@ while {_findNew} do {
|
||||
//diag_log format["#- findSafePosn -# blck_ActiveMissionCoords isEqualTo %1", blck_ActiveMissionCoords];
|
||||
{
|
||||
//diag_log format["#- findSafePosn -# blck_ActiveMissionCoords active mission item is %1", _x];
|
||||
if ( (_x distance _coords) < blck_MinDistanceFromMission) exitWith
|
||||
if ( (_x distance2D _coords) < blck_MinDistanceFromMission) exitWith
|
||||
{
|
||||
_FindNew = true;
|
||||
};
|
||||
@ -54,7 +54,7 @@ while {_findNew} do {
|
||||
if !(_ignore) then
|
||||
{
|
||||
//diag_log format["-# findSafePosn.sqf -# testing _coords against Old Mission coords is %1", _x select 0];
|
||||
if ( ((_x select 0) distance _coords) < blck_MinDistanceFromMission) then
|
||||
if ( ((_x select 0) distance2D _coords) < blck_MinDistanceFromMission) then
|
||||
{
|
||||
_FindNew = true;
|
||||
//diag_log format["-# findSafePosn.sqf -# Too Close to Old Mission element: %1", _x];
|
||||
@ -79,7 +79,7 @@ while {_findNew} do {
|
||||
// check that missions spawn at least 1 kkm from towns
|
||||
{
|
||||
_townPos = [((locationPosition _x) select 0), ((locationPosition _x) select 1), 0];
|
||||
if (_townPos distance _coords < 200) exitWith {
|
||||
if (_townPos distance2D _coords < 200) exitWith {
|
||||
_FindNew = true;
|
||||
};
|
||||
} forEach blck_townLocations;
|
||||
@ -91,7 +91,7 @@ while {_findNew} do {
|
||||
if (_mod isEqualTo "Exile") then {_pole = "Exile_Construction_Flag_Static"};
|
||||
//diag_log format["_fnc_findSafePosn:: -- >> _mod = %1 and _pole = %2",_mod,_pole];
|
||||
{
|
||||
if ((_x distance _coords) < 600) then
|
||||
if ((_x distance2D _coords) < 600) then
|
||||
{
|
||||
_FindNew = true;
|
||||
};
|
||||
@ -99,7 +99,7 @@ while {_findNew} do {
|
||||
|
||||
// check to be sure we do not spawn a mission on top of a player.
|
||||
{
|
||||
if (isPlayer _x && (_x distance _coords) < 600) then
|
||||
if (isPlayer _x && (_x distance2D _coords) < 600) then
|
||||
{
|
||||
_FindNew = true;
|
||||
};
|
||||
|
@ -26,7 +26,7 @@ _arc = 360/_wpnum;
|
||||
for [{ _x=1 },{ _x < _wpnum },{ _x = _x + 1; }] do {
|
||||
_dir = _dir + _arc;
|
||||
if (_dir > 360) then {_dir = _dir - 360;};
|
||||
while{_oldpos distance _newpos < 20}do{
|
||||
while{_oldpos distance2D _newpos < 20}do{
|
||||
sleep .1;
|
||||
|
||||
_dist = (_minDis+(random (_maxDis - _minDis)));
|
||||
|
@ -109,7 +109,7 @@ while {_wait} do
|
||||
_wait = false;
|
||||
_playerInRange = true;
|
||||
} else {
|
||||
if ({isPlayer _x && _x distance _coords < blck_TriggerDistance} count allPlayers > 0) then
|
||||
if ({isPlayer _x && _x distance2D _coords < blck_TriggerDistance} count allPlayers > 0) then
|
||||
{
|
||||
_wait = false;
|
||||
_playerInRange = true;
|
||||
@ -214,8 +214,9 @@ if (_playerInRange) then
|
||||
if (blck_useStatic && (_noEmplacedWeapons > 0)) then
|
||||
{
|
||||
private ["_emplacedUnits"];
|
||||
// params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear",["_missionType","unspecified"]];
|
||||
_emplacedUnits = [_missionEmplacedWeapons,_noEmplacedWeapons,_aiDifficultyLevel,_coords,_uniforms,_headGear,_markerClass] call blck_fnc_spawnMissionEmplacedWeapons;
|
||||
//diag_log format["missionSpawner :: (218) _emplacedUnits = %1",_emplacedUnits];
|
||||
diag_log format["missionSpawner :: (218) _emplacedUnits = %1",_emplacedUnits];
|
||||
uisleep 0.1;
|
||||
if (typeName _emplacedUnits isEqualTo "ARRAY") then
|
||||
{
|
||||
@ -229,6 +230,7 @@ if (_playerInRange) then
|
||||
{
|
||||
diag_log format["[blckeagls] missionSpawner:: (236) Static Weapons Spawned: _cords %1 : _markerClass %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_markerClass,_aiDifficultyLevel,_markerMissionName];
|
||||
};
|
||||
|
||||
};
|
||||
uisleep _delayTime;
|
||||
if (blck_useVehiclePatrols && (_noVehiclePatrols > 0)) then
|
||||
@ -285,7 +287,6 @@ if (_playerInRange) then
|
||||
//diag_log format["[blckeagls] mission Spawner _endCondition = %1",_endCondition];
|
||||
private["_missionComplete"];
|
||||
_missionComplete = -1;
|
||||
|
||||
_endIfPlayerNear = false;
|
||||
_endIfAIKilled = false;
|
||||
_startTime = diag_tickTime;
|
||||
@ -306,7 +307,7 @@ if (_playerInRange) then
|
||||
{
|
||||
if (blck_debugLevel isEqualTo 3) then
|
||||
{
|
||||
uiSleep 120;
|
||||
uiSleep 300;
|
||||
_missionComplete = 1;
|
||||
} else {
|
||||
if (_endIfPlayerNear) then {
|
||||
|
@ -4,7 +4,7 @@
|
||||
for DBD Clan
|
||||
By Ghostrider-DBD-
|
||||
Copyright 2016
|
||||
Last modified 1/12/2017
|
||||
Last modified 1/22/2017
|
||||
*/
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@ -12,12 +12,12 @@
|
||||
params["_obj1","_objList","_minDist"];
|
||||
//_obj1 : player or other object
|
||||
// _objList : array of objects
|
||||
//_minDist : distance below which the function would return true;
|
||||
//_minDist : distance within which the function would return true;
|
||||
|
||||
_result = false;
|
||||
//diag_log format["playerInRange.sqf: _obj1 = %1, _objList = %2 _minDist = %3",_obj1,_objList,_minDist];
|
||||
{
|
||||
if ((_x distance _obj1) < _minDist) exitWith {_result = true;};
|
||||
if ((_x distance2D _obj1) < _minDist) exitWith {_result = true;};
|
||||
} forEach _objList;
|
||||
|
||||
_result
|
@ -11,10 +11,9 @@
|
||||
private ["_result"];
|
||||
params["_pos","_dist"];
|
||||
diag_log format["_fnc_playerInRange:: -> _pos = %1 and _dist = %2",_pos,_dist];
|
||||
uiSleep 5;
|
||||
_result = false;
|
||||
{
|
||||
if ((_x distance _pos) < _dist) exitWith {_result = true;};
|
||||
if ((_x distance2D _pos) < _dist) exitWith {_result = true;};
|
||||
} forEach allPlayers;
|
||||
|
||||
_result
|
@ -5,33 +5,39 @@
|
||||
*/
|
||||
|
||||
params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear",["_missionType","unspecified"]];
|
||||
private ["_emplacedGroup","_emplacedAI"];
|
||||
private ["_emplacedGroup","_emplacedAI","_precise","_safepos","_wepSelected","_emp","_gunner"];
|
||||
_emplacedAI = [];
|
||||
|
||||
if (blck_debugLevel > 0) then {diag_log format["[blckeagls] _fnc_spawnMissionEmplacedWeapons(10):: - >_missionEmplacedWeapons = %2 and _noEmplacedWeapons = %1",_noEmplacedWeapons,_missionEmplacedWeapons];};
|
||||
|
||||
if ( count (_missionEmplacedWeapons) isEqualTo 0 ) then
|
||||
if ( count _missionEmplacedWeapons isEqualTo 0 ) then
|
||||
{
|
||||
_missionEmplacedWeapons = [_coords,_noEmplacedWeapons,35,50] call blck_fnc_findPositionsAlongARadius;
|
||||
diag_log format["_fnc_spawnMissionEmplacedWeapons:: (16) _missionType = %2 _missionEmplacedWeapons updated to %1",_missionEmplacedWeapons,_missionType];
|
||||
_precise = false;
|
||||
};
|
||||
|
||||
diag_log format["_fnc_spawnMissionEmplacedWeapons:: (16) _missionType = %2 _missionEmplacedWeapons updated to %1",_missionEmplacedWeapons,_missionType];
|
||||
{
|
||||
diag_log format["_fnc_spawnMissionEmplacedWeapons:: (20) spawning group to man emplaced weapon"];
|
||||
_emplacedGroup = [_x,1,1,_aiDifficultyLevel,_coords,1,2,_uniforms,_headGear] call blck_fnc_spawnGroup;
|
||||
if !(isNull _emplacedGroup) then
|
||||
diag_log format["_fnc_spawnMissionEmplacedWeapons:: (22) -> spawning _blck_fnc_spawnEmplaceWeapon at position %3 for _missionType %2 with group %1",_emplacedGroup, _missionType, _x];
|
||||
_emplacedAI append units _emplacedGroup;
|
||||
diag_log format["_fnc_spawnMissionEmplacedWeapons:: (24) _emplacedAI updated to = %1",_emplacedAI];
|
||||
// params["_pos","_emplacedGroup","_emplacedTypes",["_minDist",20],["_maxDist",35],["_precise",false], ["_missionType","undefined" ]];
|
||||
diag_log format["_fnc_spawnMissionEmplacedWeapons:: (26) spawning emplaced weapon"];
|
||||
if !(_precise) then
|
||||
{
|
||||
diag_log format["_fnc_spawnMissionEmplacedWeapons:: (23) -> spawning _blck_fnc_spawnEmplaceWeapon for _missionType %2 with group %1",_emplacedGroup, _missionType];
|
||||
// ["_pos","_emplacedGroup","_emplacedTypes",["_minDist",20],["_maxDist",35],["_precise",false] ];
|
||||
[_x,_emplacedGroup,blck_staticWeapons,5,15,_precise,_missionType] call blck_fnc_spawnEmplacedWeapon;
|
||||
} else {
|
||||
diag_log format["[blckeagls] _fnc_spawnMissionEmplacedWeapons(26):: - > Null group spawned"];
|
||||
};
|
||||
if (typeName (units _emplacedGroup) isEqualTo "ARRAY") then
|
||||
{
|
||||
_emplacedAI append (units _emplacedGroup);
|
||||
diag_log format["_fnc_spawnMissionEmplacedWeapons:: (31)-> _emplacedAI updated to %1",_emplacedAI];
|
||||
};
|
||||
_safepos = [_coords,5,10,0,0,20,0] call BIS_fnc_findSafePos;
|
||||
};
|
||||
_wepSelected = selectRandom blck_staticWeapons;
|
||||
_emp = [_wepSelected,_safepos,false] call blck_fnc_spawnVehicle;
|
||||
_emp setVariable["DBD_vehType","emplaced"];
|
||||
if (_precise) then {_emp setPosATL _pos];
|
||||
_gunner = (units _emplacedGroup) select 0;
|
||||
_gunner moveingunner _emp;
|
||||
[_emp,false] call blck_fnc_configureMissionVehicle;
|
||||
//waitUntil { count crew _emp > 0};
|
||||
blck_missionVehicles pushback _emp;
|
||||
diag_log format["_fnc_spawnMissionEmplacedWeapons:: (28) emplaced weapon _wep = %1",_wep];
|
||||
}forEach _missionEmplacedWeapons;
|
||||
|
||||
_emplacedAI
|
@ -0,0 +1,23 @@
|
||||
/*
|
||||
|
||||
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:
|
||||
|
||||
entity: Object - unit or vehicle to which EH is assigned
|
||||
weapon: String - weapon that got reloaded
|
||||
muzzle: String - weapons muzzle that got reloaded
|
||||
newMagazine: Array - new magazine info in format [magazineClass, ammoCount, magazineID, magazineCreator], where:
|
||||
magazineClass: String - class name of the magazine
|
||||
ammoCount: Number - amount of ammo in magazine
|
||||
magazineID: Number - global magazine id
|
||||
magazineCreator: Number - owner of the magazine creator
|
||||
|
||||
*/
|
||||
|
||||
private ["_unit","_mag"];
|
||||
_unit = _this select 0;
|
||||
_mag = _this select 3 select 0;
|
||||
if (blck_debugLevel > 2) then {diag_log format["_EH_unitWeaponReloaded:: unit %1 reloaded weapon %2 with magazine %3",_unit,_this select 1,_mag];
|
||||
if (blck_debugLevel > 2) then (diag_log format["_EH_unitWeaponReloaded:: one magazine of type %1 added to inventory of unit %2",_mag,_unit];
|
||||
_unit addMagazine _mag;
|
@ -13,7 +13,7 @@ _intelligence = _unit getVariable ["intelligence",1];
|
||||
if (_alertDist > 0) then {
|
||||
//diag_log format["+----+ alerting units close to %1",_unit];
|
||||
{
|
||||
if (((position _x) distance (position _unit)) <= _alertDist) then {
|
||||
if (((position _x) distance2D (position _unit)) <= _alertDist) then {
|
||||
_x reveal [_killer, _intelligence];
|
||||
//diag_log "Killer revealed";
|
||||
}
|
||||
|
@ -94,7 +94,6 @@ _weap = selectRandom _weaponList;
|
||||
|
||||
_ai1 addWeaponGlobal _weap;
|
||||
_ammoChoices = getArray (configFile >> "CfgWeapons" >> _weap >> "magazines");
|
||||
//_muzzles = getArray (configFile >> "CfgWeapons" >> _weap >> "muzzles");
|
||||
_optics = getArray (configfile >> "CfgWeapons" >> _weap >> "WeaponSlotsInfo" >> "CowsSlot" >> "compatibleItems");
|
||||
_pointers = getArray (configFile >> "CfgWeapons" >> _weap >> "WeaponSlotsInfo" >> "PointerSlot" >> "compatibleItems");
|
||||
_muzzles = getArray (configFile >> "CfgWeapons" >> _weap >> "WeaponSlotsInfo" >> "MuzzleSlot" >> "compatibleItems");
|
||||
@ -105,7 +104,7 @@ _legalOptics = [];
|
||||
}forEach _optics;
|
||||
_ammo = selectRandom _ammoChoices;
|
||||
//diag_log format["[spawnUnit.sqf] _ammo returned as %1",_ammo];
|
||||
for "_i" from 2 to (floor(random 3)) do {
|
||||
for "_i" from 2 to (round(random 3)) do {
|
||||
_ai1 addMagazine _ammo;
|
||||
};
|
||||
//if (random 1 < 0.3) then {_unit addPrimaryWeaponItem (selectRandom _muzzles)};
|
||||
@ -160,7 +159,8 @@ else
|
||||
};
|
||||
|
||||
// Infinite ammo
|
||||
_ai1 addeventhandler ["fired", {(_this select 0) setvehicleammo 1;}];
|
||||
//_ai1 addeventhandler ["fired", {(_this select 0) setvehicleammo 1;}];
|
||||
_ai1 addEventHandler ["reloaded", {_this call compile preprocessfilelinenumbers blck_EH_unitWeaponReloaded;}];
|
||||
_ai1 addEventHandler ["killed",{ [(_this select 0), (_this select 1)] call compile preprocessfilelinenumbers blck_EH_AIKilled;}]; // changed to reduce number of concurrent threads, but also works as spawn blck_AIKilled; }];
|
||||
//_ai addEventHandler ["HandleDamage",{ [(_this select 0), (_this select 1)] execVM blck_EH_AIHandleDamage;}];
|
||||
|
||||
|
@ -1,13 +1,16 @@
|
||||
// Configures a mission vehicle
|
||||
// by Ghostrider-DBD-
|
||||
// Last Updated 1/13/17
|
||||
// Last Updated 1/22/17
|
||||
|
||||
params["_veh"];
|
||||
params["_veh",["_clearInventory",true]];
|
||||
|
||||
clearWeaponCargoGlobal _veh;
|
||||
clearMagazineCargoGlobal _veh;
|
||||
clearBackpackCargoGlobal _veh;
|
||||
clearItemCargoGlobal _veh;
|
||||
if (_clearInventory) then
|
||||
{
|
||||
clearWeaponCargoGlobal _veh;
|
||||
clearMagazineCargoGlobal _veh;
|
||||
clearBackpackCargoGlobal _veh;
|
||||
clearItemCargoGlobal _veh;
|
||||
};
|
||||
_veh setVehicleLock "LOCKEDPLAYER";
|
||||
_veh addEventHandler ["GetIn",{ // Note: only fires when vehicle is local to player
|
||||
private["_unit","_veh"];
|
||||
|
@ -1,21 +1,29 @@
|
||||
// Spawns an emplaced weapons, man's it, and saves it to an array of monitored vehicles.
|
||||
// by Ghostrider-DBD-
|
||||
// Last Updated 10-25-16
|
||||
// Last Updated 1-22-17
|
||||
// ["_pos","_emplacedGroup","_emplacedTypes",["_minDist",20],["_maxDist",35],["_precise",false] ] call blck_fnc_spawnEmplacedWeapon;
|
||||
private["_emplaced","_safepos","_emp","_gunner"];
|
||||
params["_pos","_emplacedGroup","_emplacedTypes",["_minDist",20],["_maxDist",35],["_precise",false], ["_missionType","undefined" ]];
|
||||
if (isNull _emplacedGroup) exitWith {diag_log "[blckeagls] ERROR CONDITION:-->> NULL-GROUP Provided to _fnc_spawnEmplaced"; objNull;};
|
||||
diag_log format["_fnc_spawnEmplacedGroup:: -- >> _emplacedGroup = %1",_emplacedGroup];
|
||||
_safepos = [_pos,_minDist,_maxDist,0,0,20,0] call BIS_fnc_findSafePos;
|
||||
diag_log "params[_pos,_emplacedGroup,_emplacedTypes,_minDist,_maxDist,_precise,_missionType]";
|
||||
diag_log format["_fnc_spawnEmplacedGroup:: -- >> _this = %1",_this];
|
||||
if !(_precise) then
|
||||
{
|
||||
_safepos = [_pos,_minDist,_maxDist,0,0,20,0] call BIS_fnc_findSafePos;
|
||||
};
|
||||
_emplaced = selectRandom _emplacedTypes;
|
||||
_emp = [_emplaced,_safepos] call blck_fnc_spawnVehicle;
|
||||
diag_log format["_fnc_spawnEmplacedWeapon:: (14) weapon %1 selected from selection of %2",_emplaced,_emplacedTypes];
|
||||
diag_log format["_fnc_spawnEmplacedWeapon:: (15) weapon magazine cargo is %1", magazinesAmmo _emplaced];
|
||||
// params["_vehType","_pos",["_clearInventory",true]];
|
||||
_emp = [_emplaced,_safepos,false] call blck_fnc_spawnVehicle;
|
||||
_emp setVariable["DBD_vehType","emplaced"];
|
||||
diag_log format["_fnc_spawnEmplacedWeapon:: (17) weapon _%1 spawned at %2 using weapon type %3",_emp,_safepos,_emplaced];
|
||||
if (_precise) then {_emp setPosATL _pos];
|
||||
_gunner = (units _emplacedGroup) select 0;
|
||||
_gunner moveingunner _emp;
|
||||
[_emp] call blck_fnc_configureMissionVehicle;
|
||||
[_emp,false] call blck_fnc_configureMissionVehicle;
|
||||
waitUntil { count crew _emp > 0};
|
||||
blck_missionVehicles pushback _emp;
|
||||
if (blck_debugLevel > 1) then {diag_log format["spawnEmplaced.sqf: _missionType %3 || Emplaced weapon %1 spawned at position %2",_emp,getPosATL _emp,_missionType];
|
||||
if (blck_debugLevel > 1) then {diag_log format["spawnEmplaced.sqf: (24) _missionType %3 || Emplaced weapon %1 spawned at position %2",_emp,getPosATL _emp,_missionType];
|
||||
|
||||
_emp
|
||||
|
@ -2,23 +2,25 @@
|
||||
Spawn a vehicle and protect it against cleanup by Epoch
|
||||
Returns the object (vehicle) created.
|
||||
By Ghostrider-DBD-
|
||||
Last modified 10-24-16
|
||||
Last modified 1-22-17
|
||||
*/
|
||||
|
||||
private["_veh","_modType"];
|
||||
params["_vehType","_pos"];
|
||||
params["_vehType","_pos",["_clearInventory",true]];
|
||||
//_vehType = _this select 0; // type of vehicle to be spawned
|
||||
//_pos = _this select 1; // position at which vehicle is to be spawned
|
||||
|
||||
//diag_log format["spawnVehicle.sqf: _this = %1",_this];
|
||||
if (blck_debugLevel > 2) then {diag_log format["spawnVehicle.sqf: _this = %1",_this];};
|
||||
_veh = createVehicle[_vehType, _pos, [], 0, "NONE"];
|
||||
_modType = call blck_fnc_getModType;
|
||||
if (_modType isEqualTo "Epoch") then
|
||||
{
|
||||
//_veh call EPOCH_server_vehicleInit;
|
||||
_veh call EPOCH_server_setVToken;
|
||||
diag_log format["_fnc_spawnVehicle:: (20) EPOCH_server_setVToken performed for vehicle %1",_veh];
|
||||
};
|
||||
[_veh] call blck_fnc_configureMissionVehicle;
|
||||
// params["_veh",["_clearInventory",true]];
|
||||
[_veh,_clearInventory] call blck_fnc_configureMissionVehicle;
|
||||
|
||||
_veh
|
||||
|
||||
|
@ -5,12 +5,12 @@
|
||||
|
||||
By Ghostrider-DBD-
|
||||
Copyright 2016
|
||||
Last updated 1-13-17
|
||||
Last updated 1-22-17
|
||||
*/
|
||||
|
||||
private ["_veh","_vehList"];
|
||||
_vehList = blck_missionVehicles;
|
||||
//diag_log format["_fnc_vehicleMonitor:: function called with blck_missionVehicles = %1",_vehList];
|
||||
if (blck_debugLevel > 2) then {diag_log format["_fnc_vehicleMonitor:: function called with blck_missionVehicles = %1",_vehList];};
|
||||
{
|
||||
_veh = _x;
|
||||
if (_veh getVariable["blck_DeleteAt",0] > 0) then
|
||||
@ -56,8 +56,31 @@ _vehList = blck_missionVehicles;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
_veh setVehicleAmmo 1;
|
||||
_veh setFuel 1;
|
||||
private ["_crew"];
|
||||
//_veh setVehicleAmmo 1;
|
||||
//_veh setFuel 1;
|
||||
// https://community.bistudio.com/wiki/fullCrew
|
||||
// 0 1 2 3 4
|
||||
// returns Array - format [[<Object>unit,<String>role,<Number>cargoIndex,<Array>turretPath,<Boolean>personTurret], ...]
|
||||
diag_log format["_fnc_vehicleMonitor:: (65) _veh = %1",_veh];
|
||||
_crew = fullCrew _veh;
|
||||
diag_log format["_fnc_vehicleMonitor:: (67) _crew = %1",_crew];
|
||||
{
|
||||
diag_log format ["_fnc_vehicleMonitor:: (69) _x = %1",_x];
|
||||
_mag = _veh currentMagazineTurret (_x select 3);
|
||||
if (count _mag > 0) then
|
||||
{
|
||||
diag_log format["_fnc_vehicleMonitor:: (71) _mag is typeName %1", typeName _mag];
|
||||
diag_log format ["_fnc_vehicleMonitor:: (71) length _mag = %2 and _mag = %1",_mag,count _mag];
|
||||
_allMags = magazinesAmmo _veh;
|
||||
diag_log format["_fnc_vehicleMonitor:: (71) _allMags = %1",_allMags];
|
||||
_cnt = ( {_mag isEqualTo (_x select 0); diag_log format["_fnc_vehicleMonitor _x select 0 =%1",_x select 0];}count _allMags);
|
||||
diag_log format["_fnc_vehicleMonitor:: (75) _cnt = %1",_cnt];
|
||||
if (_cnt < 2) then {_veh addMagazineCargo [_mag,2]};
|
||||
};
|
||||
} forEach _crew;
|
||||
|
||||
|
||||
};
|
||||
}forEach _vehList;
|
||||
|
||||
|
@ -25,7 +25,6 @@ blck_fnc_MessagePlayers = compileFinal preprocessFileLineNumbers "\q\addons\cus
|
||||
//blck_fnc_sendRewardMessage = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_sendRewardMessage.sqf";
|
||||
|
||||
// Mission-related functions
|
||||
blck_fnc_missionTriggeredConditionsMet = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionTriggeredConditionsMet.sqf";
|
||||
blck_fnc_selectAILoadout = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectAILoadout.sqf";
|
||||
blck_fnc_addMissionToQue = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_addMissionToQue.sqf"; //
|
||||
blck_fnc_updateMissionQue = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_updateMissionQue.sqf"; //
|
||||
@ -48,8 +47,6 @@ blck_fnc_loadLootItemsFromArray = compileFinal preprocessFileLineNumbers "\q\add
|
||||
blck_fnc_fillBoxes = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_fillBoxes.sqf"; // Adds items to an object according to passed parameters. See the script for details.
|
||||
blck_fnc_smokeAtCrates = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_smokeAtCrates.sqf"; // Spawns a wreck and adds smoke to it
|
||||
blck_fnc_spawnMines = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMines.sqf"; // Deploys mines at random locations around the mission center
|
||||
blck_fnc_missionTimedOut = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionTimedOut.sqf";
|
||||
blck_fnc_missionEndConditionsMet = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionEndConditionsMet.sqf";
|
||||
blck_fnc_clearMines = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_clearMines.sqf"; // clears mines in an array passed as a parameter
|
||||
blck_fnc_signalEnd = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_signalEnd.sqf"; // deploy smoke grenades at loot crates at the end of the mission.
|
||||
blck_fnc_missionEnd = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionEnd.sqf";
|
||||
@ -75,12 +72,13 @@ blck_fnc_spawnVehiclePatrol = compileFinal preprocessFileLineNumbers "\q\addons
|
||||
blck_fnc_protectVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_protectVehicle.sqf";
|
||||
blck_fnc_configureMissionVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_configureMissionVehicle.sqf";
|
||||
blck_fnc_vehicleMonitor = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_vehicleMonitor.sqf";
|
||||
blck_fnc_deleteVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_deleteVehicle.sqf";
|
||||
//blck_fnc_deleteVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_deleteVehicle.sqf";
|
||||
|
||||
// functions to support Units
|
||||
blck_fnc_removeGear = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_removeGear.sqf"; // Strip an AI unit of all gear.
|
||||
blck_fnc_spawnAI = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_spawnUnit.sqf"; // spawn individual AI
|
||||
blck_EH_AIKilled = "\q\addons\custom_server\Compiles\Units\GMS_EH_AIKilled.sqf"; // Event handler to process AI deaths
|
||||
blck_EH_unitWeaponReloaded = "\q\addons\custom_server\Compiles\Units\GMS_EH_unitWeaponReloaded.sqf";
|
||||
//blck_EH_AIHandleDamage = "\q\addons\custom_server\Compiles\Units\GMS_EH_AIHandleDamage.sqf"; // GRMS_EH_AIHandleDamage
|
||||
blck_fnc_processAIKill = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_processAIKill.sqf";
|
||||
blck_fnc_removeLaunchers = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_removeLaunchers.sqf";
|
||||
|
@ -59,16 +59,17 @@ if (blck_debugON) then
|
||||
blck_TMax_Green = 38;
|
||||
blck_TMax_Orange = 31;
|
||||
|
||||
blck_reinforceBlue = [0.999, 2, 0.001];
|
||||
//blck_reinforceBlue = [0.999, 2, 0.001];
|
||||
//blck_MissionTimout = 60; // 40 min
|
||||
|
||||
blck_SkillsBlue = [
|
||||
["aimingAccuracy",0.01],
|
||||
["aimingShake",0.01],
|
||||
["aimingSpeed",0.01],
|
||||
["endurance",0.01],
|
||||
["spotDistance",0.01],
|
||||
["spotTime",0.01],
|
||||
["courage",0.01],
|
||||
["aimingAccuracy",0.1],
|
||||
["aimingShake",0.3],
|
||||
["aimingSpeed",0.5],
|
||||
["endurance",0.5],
|
||||
["spotDistance",0.7],
|
||||
["spotTime",0.7],
|
||||
["courage",0.7],
|
||||
["reloadSpeed",0.80],
|
||||
["commanding",0.8],
|
||||
["general",1.00]
|
||||
|
9
@epochhive/addons/custom_server/KnownIssues.txt
Normal file
9
@epochhive/addons/custom_server/KnownIssues.txt
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
Known issues
|
||||
|
||||
1. Missions sometimes are not triggered by players.
|
||||
2. Missions are sometimes not completed even when completion criteria are met.
|
||||
3. Infinite ammo is not working for at least some weapons. Probable cause is the arma engine as server logs show multiple errors related to weapons not being found.
|
||||
This impacts both vehicle-mounted weapons and AI weapons.
|
||||
4. Emplaced weapons are not spawning correctly.
|
@ -9,6 +9,9 @@ Fixed an error in how the waitTime till a mission was respawned after being upda
|
||||
Added additional reporting as to the mission type for which AI, statics and vehicle patrols are being spawned.
|
||||
Continued switching from blck_debugOn to blck_debugLevel.
|
||||
Removed old code that had been commented out from GMS_missionSpawner.
|
||||
deactivated the 'fired' event handler
|
||||
added an 'reloaded' event handler to units that adds a magazin of the type used to reload the weapon to prevent units running out of ammo. this also provides a break in firing and is more realistic.
|
||||
Added a check to GMS_fnc_vehicleMonitor that addes ammo to vehicle cargo when stores are low. Removed the infinite ammo script for static and vehicle weapons, again for greater realism.
|
||||
|
||||
1/21/17 Build 29.
|
||||
Went back to the timerless system for spawning missions.
|
||||
|
Loading…
x
Reference in New Issue
Block a user