Merge pull request #37 from Ghostrider-DbD-/Version-6.54-Build-33
Housekeeping changes.
This commit is contained in:
commit
725f4029f7
@ -1,44 +0,0 @@
|
||||
|
||||
//blck_customMarkers = [];
|
||||
|
||||
private _markers = [
|
||||
[31086.898,0,29440.51],"ServerRule","Server Rules:","mil_triangle","ColorRed"],
|
||||
[[31143.064,0,28674.146],"ServerRule1","No PVP","mil_dot","ColorWhite"],
|
||||
[[31136.533,0,27647.641],"ServerRule2","No THEFT from dead players, bases or unlocked vehicles.","mil_dot","ColorWhite"],
|
||||
[[31129.488,0,25672.701],"ServerRule3","Don't go to players bases. Not to look, not hang around.","mil_dot","ColorWhite"],
|
||||
[[31136.486,20.089996,26683.422],"ServerRule4","Racism, hacking, glitching, duping or theft will result in a ban.","mil_dot","ColorWhite"],
|
||||
[[31137.244,5.0910034,24665.658],"ServerRule5","Please be respectful of other players and admins. What an Admin says is final.","mil_dot","ColorWhite"],
|
||||
[[31140.377,28.001938,23660.883],"ServerRule6","Don't leave vehicles at the traders. These will be unlocked at restarts.","mil_dot","ColorWhite"],
|
||||
[[93.216553,5.6385589e+013,-577.87292],"MissionsRule","Mission Rules:","mil_triangle","ColorRed"],
|
||||
[[63.282959,5.6385589e+013,-1236.0565],"MissionRule1","Call missions in side chat and place a marker on the map with your name at the location of the mission you are headed to.","mil_dot","ColorWhite"],
|
||||
[[58.716553,0,-2213.2051],"MissionRule2","You call the mission when you are on the way to it, not when you are going to do something else.","mil_dot","ColorWhite"],
|
||||
[[52.185303,0,-3239.7109],"MissionRule3","Don't go to other players missions, you have nothing there to do.","mil_dot","ColorWhite"],
|
||||
[[45.140381,0,-5214.6504],"MissionRule4","First to call out the mission owns it, thats includes AI gear and mission loot. (If you haven't marked and called it out, you will loose if someone do that.)","mil_dot","ColorWhite"];
|
||||
[[52.138428,0,-4203.9287],"MissionRule5","You/Your group can only call one mission at time.","mil_dot","ColorWhite"],
|
||||
[[52.89624,0,-6221.6934],"MissionRule6","You don't need to call a out a mission if it is in the PVP zone. But if you are doing it from the outside of pvp zone, you will still be a target for PVP.","mil_dot","ColorWhite"],
|
||||
[[56.029053,7.7267151,-7226.4678],"MissionRule7","Mission that spawns inside or if the mission marker touches the pvp marker will be marked as pvp.","mil_dot","ColorWhite"],
|
||||
[[-12477.028,0,38781.328],"BuildingsRules","Buildings Rules:","mil_triangle","ColorRed"],
|
||||
[[{-12420.862,0,38014.969],"BuildingsRules1","Do not build in pre-buildings.","mil_dot","ColorWhite"],
|
||||
[[-12427.394,0,36988.461],"BuildingsRules2","Do not build on or so as to block roads.","mil_dot","ColorWhite"],
|
||||
[[-12434.438,2.7021473e+037,35013.523],"BuildingsRules3","When you build, look around and see if your flag will effect any loot spawning. Your flag has a 150m radius, so to be on the safe side build at least 175-200m from loot spawns.","mil_dot","ColorWhite"],
|
||||
[[-12427.44,0,36024.242],"BuildingsRules4","Do not build in or near high loot areas such as office buildings, airport hangers, or military installations. Flag poles block loot from spawning at these locations.","mil_dot","ColorWhite"],
|
||||
[[-12426.683,0,34006.477]],"BuildingsRules5","Do not build and sniperbases near mafia places, stronghold. (They are not your personal mission.)","mil_dot","ColorWhite"],
|
||||
[[-12423.55,0,33001.707,"BuildingsRules6","No air bases. Your base has to touch the ground.","mil_dot","ColorWhite"],
|
||||
[[-12419.35,0,32066.854],"BuildingsRules7","Admin will delete bases that are breaking these rules, and you will get nothing back.","mil_dot","ColorWhite"],
|
||||
[[24.283001,-4.3682598e-035,-8286.0889],"PVPZonesRule","PVP Zones Rules:","mil_triangle","ColorYellow"],
|
||||
[[80.448997,5.0616355e+037,-9052.4521],"PVPZonesRule1","Any things goes.","mil_dot","ColorWhite"],
|
||||
[[73.917999,-1.3038923e-012,-10078.958,"PVPZonesRule2","You can't be running around just outside the pvp zone and call pve if you get shoot, if you are there, you are a target.","mil_dot","ColorWhite"],
|
||||
[[66.873001,-6.6600447e-037,-12053.896],"PVPZonesRule3","Mission that spawns inside or if the mission marker touches the pvp marker will be marked as pvp.","mil_dot","ColorWhite"],
|
||||
[[73.871002,-7.911346e-021,-11043.177],"PVPZonesRule4","If anyone of your team/group is in the pvpzone and you are near it you will consider a legite target.","mil_dot","ColorWhite"],
|
||||
[[-12857.771,4.3924521e+035,45162.469],,"Good to know:","mil_triangle","ColorOrange"],
|
||||
[[-12801.605,0,44396.109],"GoodToKnow1","If you building or park your vehicles where missions spawns, be preper to login to a place where your vehicle are gone. As AI and player will have battles there.","mil_dot","ColorWhite"],
|
||||
[[-12808.137,0,43369.598],"GoodToKnow2","ArmA is a glitchy game. Don't park vehicles on floors/roofs. It may work 1 server session but go boom the next. And they will not be replaced by Admins.","mil_dot","ColorWhite"],
|
||||
[[12815.182,23135064,41394.66],"GoodToKnow3","What you do will effect your whole group. What your friends do will effect you. It's your job to look after your friends.","mil_dot","ColorWhite"],
|
||||
[[-12808.184,0,42405.379],"GoodToKnow4","If you gone park your vehicle inside your base, make sure your base is big enough to hold them in there.","mil_dot",,"ColorWhite"],
|
||||
[[-12833.245,-2.2216157e-031,40349.613],"GoodToKnow5","Use commen sense. Ask your self, would I like this happen too me?","mil_dot","ColorWhite"],
|
||||
[[-12848.92,-1.4167476e-034,39791.008],"GoodToKnow6","ON EPOCH: Don't hord vehicles, 1 air, 2 land per player. Admin will delete them if think your breaking the limit.","mil_dot","ColorWhite"]
|
||||
];
|
||||
|
||||
{
|
||||
_x call blck_fnc_addcustomMarker;
|
||||
}forEach _markers;
|
@ -1,18 +0,0 @@
|
||||
|
||||
blck_customMarkers = [];
|
||||
blck_fnc_addCustomMarker = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\CustomMarkers\GMS_fnc_addCustomMarkers.sqf";
|
||||
if (!isServer) exitWith{};
|
||||
_modType = call blck_fnc_getModType;
|
||||
if (_modType isEqualTo "Epoch") then
|
||||
{
|
||||
[] execVM "\q\addons\custom_server\Compiles\CustomMarkers\CustomMarkers_Epoch.sqf";
|
||||
};
|
||||
|
||||
if (_modType isEqualTo "Exile") then
|
||||
{
|
||||
[] execVM "\q\addons\custom_server\Compiles\CustomMarkers\CustomMarkers_Exile.sqf";
|
||||
};
|
||||
|
||||
{
|
||||
|
||||
}forEach blck_customMarkers;
|
@ -1,18 +0,0 @@
|
||||
|
||||
blck_customMarkers = [];
|
||||
blck_fnc_addCustomMarker = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\CustomMarkers\GMS_fnc_addCustomMarkers.sqf";
|
||||
if (!isServer) exitWith{};
|
||||
_modType = call blck_getModType;
|
||||
if (_modType isEqualTo "Epoch") then
|
||||
{
|
||||
[] execVM "\q\addons\custom_server\Compiles\CustomMarkers\CustomMarkers_Epoch.sqf";
|
||||
};
|
||||
|
||||
if (_modType isEqualTo "Exile") then
|
||||
{
|
||||
[] execVM "\q\addons\custom_server\Compiles\CustomMarkers\CustomMarkers_Exile.sqf";
|
||||
};
|
||||
|
||||
{
|
||||
|
||||
}forEach blck_customMarkers;
|
@ -1,20 +0,0 @@
|
||||
|
||||
/*
|
||||
GMS_fnc_addCustomMarker.sqf
|
||||
adds a custom marker to the array of custom markers that should be shown.
|
||||
*/
|
||||
|
||||
params["_marker"];
|
||||
_type = [];
|
||||
if (typeName _marker select 3 isEqualTo "STRING") then {_type = [_marker select 3,[],""]};
|
||||
if (typeName _marker select 3 isEqualTo "ARRAY" and count (_marker select 3) isEqualTo 3) then {_type = _marker select 3};
|
||||
private _m = [format["cm%1%2",_marker select 0 select 0,_marker select 0 select 1],_marker select 0,_marker select 1,_marker select 2,"",_marker select 4,_type];
|
||||
diag_log format["customMarkers_Epoch.sqf:: _m = %1",_m];
|
||||
if !(_type isEqualTo []) then
|
||||
{
|
||||
blck_customMarkers pushback _m;
|
||||
};
|
||||
|
||||
true
|
||||
|
||||
|
@ -1,31 +0,0 @@
|
||||
diag_log "-- >> Loading Custom Markers for blckeagls Mission System";
|
||||
|
||||
blck_customMarkers = [];
|
||||
blck_fnc_addCustomMarker = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\CustomMarkers\GMS_fnc_addCustomMarker.sqf";
|
||||
|
||||
if (!isServer) exitWith{};
|
||||
|
||||
_modType = call blck_fnc_getModType;
|
||||
if (_modType isEqualTo "Epoch") then
|
||||
{
|
||||
[] execVM "\q\addons\custom_server\Compiles\CustomMarkers\CustomMarkers_Epoch.sqf";
|
||||
};
|
||||
|
||||
if (_modType isEqualTo "Exile") then
|
||||
{
|
||||
//[] execVM "\q\addons\custom_server\Compiles\CustomMarkers\CustomMarkers_Exile.sqf";
|
||||
};
|
||||
|
||||
{
|
||||
/*
|
||||
for spawnMarker.sqf parameters are:
|
||||
_mArray params["_missionType","_markerPos","_markerLabel","_markerLabelType","_markerColor","_markerType"];
|
||||
_markerType params["_mShape","_mSize","_mBrush"];
|
||||
*/
|
||||
// [31086.898,0,29440.51],"ServerRule","Server Rules:","mil_triangle","ColorRed"],
|
||||
if (blck_debugON) then {diag_log format["[blckeagls] custom markers:: -- >> Adding marker %1",_x];};
|
||||
private _markerDefinitions = [_x select 1,_x select 0,_x select 2,"",_x select 4,_x select 3];
|
||||
[_markerDefinitions] execVM "debug\spawnMarker.sqf";
|
||||
}forEach blck_customMarkers;
|
||||
|
||||
diag_log "[blckeagls] -- >> Custom Markers Loaded";
|
@ -1,31 +0,0 @@
|
||||
diag_log "-- >> Loading Custom Markers for blckeagls Mission System";
|
||||
|
||||
blck_customMarkers = [];
|
||||
blck_fnc_addCustomMarker = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\CustomMarkers\GMS_fnc_addCustomMarker.sqf";
|
||||
|
||||
if (!isServer) exitWith{};
|
||||
|
||||
_modType = call blck_getModType;
|
||||
if (_modType isEqualTo "Epoch") then
|
||||
{
|
||||
[] execVM "\q\addons\custom_server\Compiles\CustomMarkers\CustomMarkers_Epoch.sqf";
|
||||
};
|
||||
|
||||
if (_modType isEqualTo "Exile") then
|
||||
{
|
||||
//[] execVM "\q\addons\custom_server\Compiles\CustomMarkers\CustomMarkers_Exile.sqf";
|
||||
};
|
||||
|
||||
{
|
||||
/*
|
||||
for spawnMarker.sqf parameters are:
|
||||
_mArray params["_missionType","_markerPos","_markerLabel","_markerLabelType","_markerColor","_markerType"];
|
||||
_markerType params["_mShape","_mSize","_mBrush"];
|
||||
*/
|
||||
// [31086.898,0,29440.51],"ServerRule","Server Rules:","mil_triangle","ColorRed"],
|
||||
if (blck_debugON) then {diag_log format["[blckeagls] custom markers:: -- >> Adding marker %1",_x];};
|
||||
private _markerDefinitions = [_x select 1,_x select 0,_x select 2,"",_x select 4,_x select 3];
|
||||
[_markerDefinitions] execVM "debug\spawnMarker.sqf";
|
||||
}forEach blck_customMarkers;
|
||||
|
||||
diag_log "[blckeagls] -- >> Custom Markers Loaded";
|
@ -1,12 +0,0 @@
|
||||
/*
|
||||
Adds a list of live AI associated with a mission to a que of live AI that will be deleted at a later time by the main thread
|
||||
call as [ [list of AI], time] call blck_fnc_addLiveAItoQue; where time is the time delay before deletion occurs
|
||||
|
||||
by Ghostrider-DbD-
|
||||
Last modified 10-14-16
|
||||
*/
|
||||
|
||||
params["_aiList","_timeDelay"];
|
||||
|
||||
blck_liveMissionAI pushback [_aiList, (diag_tickTime + _timeDelay)];
|
||||
|
@ -1,12 +0,0 @@
|
||||
/*
|
||||
Adds a list of live AI associated with a mission to a que of live AI that will be deleted at a later time by the main thread
|
||||
call as [ [list of AI], time] call blck_fnc_addLiveAItoQue; where time is the time delay before deletion occurs
|
||||
|
||||
by Ghostrider-DbD-
|
||||
Last modified 10-14-16
|
||||
*/
|
||||
|
||||
params["_aiList","_timeDelay"];
|
||||
|
||||
blck_liveMissionAI pushback [_aiList, (diag_tickTime + _timeDelay)];
|
||||
|
@ -1,76 +0,0 @@
|
||||
/*
|
||||
blck_monitoredVehicles = [];
|
||||
blck_liveMissionAI = [];
|
||||
blck_missionObjects = [];
|
||||
*/
|
||||
|
||||
diag_log "[blckeagls]:-->> starting custom_server monitor ver 1.0 6:40 AM";
|
||||
for "_i" from 1 to 1000 do
|
||||
{
|
||||
diag_log format["_fnc_monitor running diag_tickTime = %1",diag_tickTime];
|
||||
uiSleep 20;
|
||||
diag_log format["_fnc_monitor:-->> server time = %1",diag_tickTime];
|
||||
diag_log format["_fnc_monitor:-->> blck_liveMissionAI = %1",blck_liveMissionAI];
|
||||
diag_log format["_fnc_monitor:-->> blck_missionObjects = %1",blck_missionObjects];
|
||||
diag_log format["_fnc_monitor:-->> blck_monitoredVehicles = %1",blck_monitoredVehicles];
|
||||
|
||||
// clean up alive AI when it is time.
|
||||
{
|
||||
if ( (diag_tickTime - (_x select 1) > blck_AliveAICleanUpTime) ) then
|
||||
{
|
||||
diag_log format ["cleaning up Alive AI %1",_x];
|
||||
blck_liveMissionAI = blck_liveMissionAI - _x;
|
||||
[_x select 0] call blck_fnc_cleanupAliveAI;
|
||||
};
|
||||
}forEach blck_liveMissionAI;
|
||||
|
||||
// clean up mission objects when it is time.
|
||||
{
|
||||
if ( (diag_tickTime - (_x select 1) > blck_cleanupCompositionTimer) ) then
|
||||
{
|
||||
diag_log format ["cleaning up Alive AI %1",_x];
|
||||
[_x select 0] call blck_fnc_cleanupObjects;
|
||||
blck_missionObjects = blck_missionObjects - [_x];
|
||||
};
|
||||
}forEach blck_missionObjects;
|
||||
|
||||
// If there are crew and the crew is alive and the vehicle is not severely damaged that wait.
|
||||
//if
|
||||
{
|
||||
if ({alive _x} count crew _veh == 0 || (damage _x) > 0.9) then {[_x] spawn blck_fnc_vehicleMonitor;};
|
||||
}forEach blck_monitoredVehicles;
|
||||
};
|
||||
/*
|
||||
[] spawn {
|
||||
while {true} do
|
||||
{
|
||||
|
||||
|
||||
/*
|
||||
// clean up alive AI when it is time.
|
||||
{
|
||||
if ( (diag_tickTime - (_x select 1) > blck_AliveAICleanUpTime) ) then
|
||||
{
|
||||
[_x select 0] call blck_fnc_cleanupAliveAI;
|
||||
};
|
||||
}forEach blck_liveMissionAI
|
||||
|
||||
// clean up alive AI when it is time.
|
||||
{
|
||||
if ( (diag_tickTime - (_x select 1) > blck_cleanupCompositionTimer) ) then
|
||||
{
|
||||
[_x select 0] call blck_fnc_cleanupObjects;
|
||||
};
|
||||
}forEach blck_missionObjects;
|
||||
|
||||
{
|
||||
|
||||
// If there are crew and the crew is alive and the vehicle is not severely damaged that wait.
|
||||
//if
|
||||
{
|
||||
if ({alive _x} count crew _veh == 0 || (damage _x) > 0.9) then {[_x] spawn blck_fnc_vehicleMonitor;};
|
||||
}forEach blck_monitoredVehicles;
|
||||
|
||||
};
|
||||
};
|
||||
*/
|
@ -1,15 +0,0 @@
|
||||
/*
|
||||
|
||||
*/
|
||||
params["_objects","_mines","_crates","_blck_AllMissionAI","_AI_Vehicles","_blck_localMissionMarker"];
|
||||
// discard everything
|
||||
{deleteVehicle _x} forEach _objects;
|
||||
{deleteVehicle _x} forEach _mines;
|
||||
{deleteVehicle _x} forEach _crates;
|
||||
{deleteVehicle _x} forEach _blck_AllMissionAI;
|
||||
{deleteVehicle _x} forEach _AI_Vehicles;
|
||||
// set the mission status to waiting
|
||||
[_blck_localMissionMarker select 0,"Completed"] call blck_fnc_updateMissionQue;
|
||||
uiSleep 1;
|
||||
// delete any empty groups left over from the cleanup.
|
||||
[] call blck_fnc_cleanEmptyGroups;
|
@ -1,24 +0,0 @@
|
||||
/*
|
||||
[_crates,_mines,_objects,_blck_AllMissionAI,_blck_localMissionMarker] call blck_fnc_missionEnd;
|
||||
*/
|
||||
|
||||
params["_crates","_mines","_objects","_blck_AllMissionAI","_blck_localMissionMarker"];
|
||||
diag_log format["[blckeagls] _fnc_missionEnd (6):-> _blck_AllMissionAI = %1",_blck_AllMissionAI];
|
||||
if (blck_useSignalEnd) then
|
||||
{
|
||||
//diag_log format["**** Minor\SM1.sqf:: _crate = %1",_crates select 0];
|
||||
[_crates select 0] spawn blck_fnc_signalEnd;
|
||||
|
||||
if (blck_debugLevel > 2) then
|
||||
{
|
||||
diag_log format["[blckeagls] missionSpawner:: SignalEnd called: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
|
||||
};
|
||||
};
|
||||
|
||||
[_mines] spawn blck_fnc_clearMines;
|
||||
[_objects, blck_cleanupCompositionTimer] call blck_fnc_addObjToQue;
|
||||
[_blck_AllMissionAI,blck_AliveAICleanUpTime] call blck_fnc_addLiveAItoQue;
|
||||
[["end",_endMsg,_blck_localMissionMarker select 2]] call blck_fnc_messageplayers;
|
||||
[_blck_localMissionMarker select 1, _missionType] call compile preprocessfilelinenumbers "debug\missionCompleteMarker.sqf";
|
||||
[_blck_localMissionMarker select 0] call compile preprocessfilelinenumbers "debug\deleteMarker.sqf";
|
||||
[_blck_localMissionMarker select 0,"Completed"] call blck_fnc_updateMissionQue;
|
@ -1,43 +0,0 @@
|
||||
//////////////////////////////////////////////////////
|
||||
// test whether the end conditions for a mission have been met
|
||||
// by Ghostrider-DBD-
|
||||
// Last modified 1/12/17
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
params ["_locations","_blck_AllMissionAI","_endCondition"];
|
||||
private{"_missionComplete","_endIfPlayerNear","_endIfAIKilled"];
|
||||
_missionComplete = false;
|
||||
_endIfAIKilled - false;
|
||||
_endIfPlayerNear = false;
|
||||
switch (_endCondition) do
|
||||
{
|
||||
case "playerNear": {_endIfPlayerNear = true;};
|
||||
case "allUnitsKilled": {_endIfAIKilled = true;};
|
||||
case "allKilledOrPlayerNear": {_endIfPlayerNear = true;_endIfAIKilled = true;};
|
||||
};
|
||||
if (blck_debugON) then {diag_log format["_fnc_missionEndConditionMet:: -> _endIfPlayerNear = %1, _endIfAIKilled = %2, _endCondition = %3",_endIfPlayerNear,_endIfAIKilled,_endCondition];
|
||||
if (blck_debugLevel isEqualTo 3) then
|
||||
{
|
||||
uiSleep 60;
|
||||
diag_log "_fnc_missionEndConditionMet::-> bypassing end condtions, blck_debugLevel == 3";
|
||||
} else {
|
||||
while {!_missionComplete} do
|
||||
{
|
||||
uiSleep 5;
|
||||
if (_endIfPlayerNear) then {
|
||||
if ( { (isPlayer _x) && ([_x,_locations,20] call blck_fnc_objectInRange) && (vehicle _x == _x) } count allPlayers > 0) then {
|
||||
_missionComplete = true;
|
||||
};
|
||||
};
|
||||
|
||||
if (_endIfAIKilled) then {
|
||||
private _alive = ({alive _x} count _blck_AllMissionAI) > 0;
|
||||
diag_log format["missionSpawner:: count alive _blck_AllMissionAI = %1",_alive];
|
||||
if (({alive _x} count _blck_AllMissionAI) < 1 ) then {
|
||||
_missionComplete = true;
|
||||
diag_log format["missionSpawner:: _blck_AllMissionAI = %1","testing case _endIfAIKilled"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
true
|
@ -1,232 +0,0 @@
|
||||
/*
|
||||
Generic Mission Spawner
|
||||
for DBD Clan
|
||||
By Ghostrider-DBD-
|
||||
Copyright 2016
|
||||
Last modified 1/12/17
|
||||
*/
|
||||
|
||||
private ["_crates","_aiGroup","_objects","_groupPatrolRadius","_missionLandscape","_mines","_blck_AllMissionAI","_blck_localMissionMarker","_AI_Vehicles"];
|
||||
params["_coords","_missionType","_aiDifficultyLevel"];
|
||||
waitUntil {blck_missionSpawning isEqualTo false};
|
||||
blck_missionSpawning = true;
|
||||
diag_log format["[blckeagls] missionSpawner:: Initializing mission: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
|
||||
|
||||
private["_chanceHeliPatrol","_noPara","_reinforcementLootCounts","_chanceLoot","_heliCrew"];
|
||||
if (isNil "_chanceReinforcements") then
|
||||
{
|
||||
_chanceReinforcements = 0;
|
||||
_noPara = 0;
|
||||
_reinforcementLootCounts = [0,0,0,0,0,0];
|
||||
_chanceHeliPatrol = 0;
|
||||
_chanceLoot = 0;
|
||||
};
|
||||
|
||||
private["_timeOut","_blck_AllMissionAI"]; // _timeOut is the time in seconds after which a mission is deactivated.
|
||||
if (isNil "_markerColor") then {_markerColor = "ColorBlack"};
|
||||
if (isNil "_markerType") then {_markerType = ["mil_box",[]]};
|
||||
if (isNil "_timeOut") then {_timeOut = -1;};
|
||||
if (isNil "_noPara") then {_noPara = 0};
|
||||
if (isNil "_chanceHeliPatrol") then {_chanceHeliPatrol = 0;};
|
||||
if (isNil "_chanceLoot") then {_chanceLoot = 0};
|
||||
if (isNil "_heliCrew") then {_heliCrew = 3};
|
||||
|
||||
if (isNil "_reinforcementLootCounts") then
|
||||
{
|
||||
private["__weap","_mags","_backpacks","_optics","_loadout"];
|
||||
_weap = 2 + floor(random(4));
|
||||
_mags = 5 + floor(random(6));
|
||||
_backpacks = 1 + floor(random(2));
|
||||
_optics = 1 + floor(random(6));
|
||||
_loadout = 1 + floor(random(3));
|
||||
_reinforcementLootCounts = [_weap,_mags,_optics,0,0,_backpacks];
|
||||
if (blck_debugLevel > 0) then {diag_log "missionSpawner:: default values used for _reinforcementLootCounts";};
|
||||
}
|
||||
else
|
||||
{
|
||||
if (blck_debugLevel > 0) then {diag_log "missionSpawner:: Mission specific values used for _reinforcementLootCounts";};
|
||||
};
|
||||
|
||||
if (blck_debugLevel > 0) then {
|
||||
diag_log format["[blckEagle] Mission Reinforcement Parameters: changeReinforcements %1 numAI %2 changePatrol %3 chanceLoot %4",_chanceReinforcements,_noPara,_chanceHeliPatrol,_chanceLoot];
|
||||
};
|
||||
|
||||
private["_useMines","_abortMissionSpawner","_blck_AllMissionAI","_delayTime","_groupPatrolRadius"];
|
||||
if (isNil "_useMines") then {_useMines = blck_useMines;};
|
||||
|
||||
_objects = [];
|
||||
_mines = [];
|
||||
_crates = [];
|
||||
_aiGroup = [];
|
||||
_missionAIVehicles = [];
|
||||
_blck_AllMissionAI = [];
|
||||
_AI_Vehicles = [];
|
||||
_blck_localMissionMarker = [_missionType,_coords,"","",_markerColor,_markerType];
|
||||
_delayTime = 1;
|
||||
_groupPatrolRadius = 50;
|
||||
_abortMissionSpawner = false;
|
||||
|
||||
[_blck_localMissionMarker select 0,"Active",_coords] call blck_fnc_updateMissionQue;
|
||||
|
||||
if (blck_labelMapMarkers select 0) then
|
||||
{
|
||||
//diag_log "SM1.sqf: labeling map markers *****";
|
||||
_blck_localMissionMarker set [2, _markerMissionName];
|
||||
};
|
||||
if !(blck_preciseMapMarkers) then
|
||||
{
|
||||
//diag_log "SM1.sqf: 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?
|
||||
[["start",_startMsg,_blck_localMissionMarker select 2]] call blck_fnc_messageplayers;
|
||||
[_blck_localMissionMarker] execVM "debug\spawnMarker.sqf";
|
||||
|
||||
uiSleep 1;
|
||||
blck_missionSpawning = false;
|
||||
if (blck_debugLevel > 0) then {diag_log "missionSpawner:: waiting for player to trigger the mission";};
|
||||
private _missionStartTime = diag_tickTime;
|
||||
waitUntil{[_coords,blck_TriggerDistance,blck_MissionTimout] call blck_fnc_missionStartConditionsMet;};
|
||||
if (((diag_tickTime - _missionStartTime) > blck_MissionTimout)) exitWith
|
||||
{
|
||||
//["timeOut",_endMsg,_blck_localMissionMarker select 2] call blck_fnc_messageplayers;
|
||||
[_blck_localMissionMarker select 0] execVM "debug\deleteMarker.sqf";
|
||||
[_objects, 1] spawn blck_fnc_cleanupObjects;
|
||||
[_blck_localMissionMarker select 0,"Completed"] call blck_fnc_updateMissionQue;
|
||||
if (blck_debugLevel > 0) then
|
||||
{
|
||||
diag_log format["[blckeagls] missionSpawner:: Mission Timed Out: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
if (blck_debugLevel > 0) then
|
||||
{ diag_log format["[blckeagls] missionSpawner:: -- >> Mission tripped by nearby player: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
|
||||
};
|
||||
|
||||
if (count _missionLootBoxes > 0) then
|
||||
{
|
||||
_crates = [_coords,_missionLootBoxes] call blck_fnc_spawnMissionCrates;
|
||||
}
|
||||
else
|
||||
{
|
||||
_crates = [_coords,[[selectRandom blck_crateTypes /*"Box_NATO_Wps_F"*/,[0,0,0],_crateLoot,_lootCounts]]] call blck_fnc_spawnMissionCrates;
|
||||
|
||||
};
|
||||
|
||||
if (blck_debugLevel > 0) then
|
||||
{
|
||||
diag_log format["[blckeagls] missionSpawner:: Crates Spawned: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
|
||||
};
|
||||
|
||||
uiSleep _delayTime;
|
||||
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;
|
||||
_objects append _temp;
|
||||
};
|
||||
uiSleep _delayTime;
|
||||
if (_useMines) then
|
||||
{
|
||||
_mines = [_coords] call blck_fnc_spawnMines;
|
||||
uiSleep _delayTime;;
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
_objects append _temp;
|
||||
diag_log format["_fnc_missionSpawner::->> mission objects spawned = %1",_objects];
|
||||
|
||||
if (blck_debugON) then
|
||||
{
|
||||
diag_log format["[blckeagls] missionSpawner:: Landscape spawned: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
|
||||
};
|
||||
|
||||
uiSleep _delayTime;;
|
||||
|
||||
if ((count _missionLootVehicles) > 0) then // spawn loot vehicles
|
||||
{
|
||||
diag_log "[blckEagles] _fnc_missionSpawner:: Spawning Mission Loot Vehicles";
|
||||
private _vehs = [_missionLootVehicles] call blck_fnc_spawnMissionLootVehicles;
|
||||
};
|
||||
|
||||
uiSleep _delayTime;
|
||||
diag_log "[blckEagle] _fnc_missionSpawner:: spawning AI";
|
||||
_blck_AllMissionAI = [_coords,_minNoAI,_maxNoAI,_aiDifficultyLevel,_uniforms,_headGear] call blck_fnc_spawnMissionAI;
|
||||
diag_log format["[blckeagls] _fnc_missionSpawner (190):-> _blck_AllMissionAI = %1",_blck_AllMissionAI];
|
||||
if (blck_debugON) then
|
||||
{
|
||||
diag_log format["[blckeagls] missionSpawner:: AI Patrols Spawned: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
|
||||
};
|
||||
|
||||
uiSleep _delayTime;
|
||||
private _emp = [];
|
||||
diag_log format["[blckeagls] _fnc_missionSpawner (197):-> _noEmplacedWeapons = %1",_noEmplacedWeapons];
|
||||
if (!blck_useStatic && (_noEmplacedWeapons > 0)) then
|
||||
{
|
||||
private ["_emplacedGroup","_emplacedPositions"];
|
||||
|
||||
_emplacedPositions = [_coords,_count,35,50] call blck_fnc_findPositionsAlongARadius;
|
||||
//diag_log format["missionSpawner:: _emplacedPositions = %1",_emplacedPositions];
|
||||
{
|
||||
_emplacedGroup = [_x,1,1,_aiDifficultyLevel,_coords,1,2,_uniforms,_headGear] call blck_fnc_spawnGroup;
|
||||
if !(isNull _emplacedGroup) then
|
||||
{
|
||||
_blck_AllMissionAI = _blck_AllMissionAI + (units _emplacedGroup);
|
||||
_emplacedWeapon = [_x,_emplacedGroup,blck_staticWeapons,5,15] call blck_fnc_spawnEmplacedWeapon;
|
||||
_missionAIVehicles pushback _emplacedWeapon;
|
||||
uiSleep _delayTime;
|
||||
};
|
||||
}forEach _emplacedPositions;
|
||||
};
|
||||
if (blck_debugLevel > 0) then {diag_log format["[blckeagls] _fnc_missionSpawner (208):-> _blck_AllMissionAI = %1",_blck_AllMissionAI];};
|
||||
uiSleep _delayTime;
|
||||
if (blck_useVehiclePatrols && (_noVehiclePatrols > 0)) then
|
||||
{
|
||||
diag_log "[blckEagles] _fnc_missionSpawner:: spawning patrol vehicles";
|
||||
private _return = [_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear] call blck_fnc_spawnMissionVehiclePatrols;
|
||||
if (count _return isEqualTo 2) then
|
||||
{
|
||||
_blck_AllMissionAI = _blck_AllMissionAI + (_return select 0);
|
||||
_AI_Vehicles = _AI_Vehicles + (_return select 1);
|
||||
};
|
||||
};
|
||||
|
||||
if ((random(1) < _chanceReinforcements)) then
|
||||
{
|
||||
diag_log format["[blckeagls] missionSpawner:: calling in reinforcements: _heliCrew = %1",4];
|
||||
private["_grpPilot","_supplyHeli"];
|
||||
_grpPilot = createGroup blck_AI_Side;
|
||||
_grpPara = createGroup blck_AI_Side;
|
||||
if (!(isNulL _grpPilot) && !(isNull _grpPara)) then
|
||||
{
|
||||
//_supplyHeli = [_coords,_grpPilot,_chanceLoot] call blck_fnc_spawnMissionHeli;
|
||||
//[_coords,_grpPara,_noPara,_aiDifficultyLevel,_chanceLoot,_reinforcementLootCounts,_uniforms,_headgear,_supplyHeli,_grpPilot] spawn blck_fnc_callInReinforcements;
|
||||
} else { deleteGroup _grpPilot; deleteGroup _grpPara;};
|
||||
};
|
||||
|
||||
if (blck_debugON) then {diag_log "[blckeagls] _fnc_missionSpawner (214) :: waiting for mission completion criterion to be met";
|
||||
waitUntil{[_crates,_blck_AllMissionAI,_endCondition] call blck_fnc_missionEndConditionsMet;};
|
||||
if (blck_debugLevel > 0) then
|
||||
{
|
||||
diag_log format["[blckeagls] missionSpawner:: Mission completion criteria fulfilled: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
|
||||
};
|
||||
|
||||
if (blck_useSignalEnd) then
|
||||
{
|
||||
[_crates select 0] spawn blck_fnc_signalEnd;
|
||||
};
|
||||
[_mines] spawn blck_fnc_clearMines;
|
||||
[_objects, blck_cleanupCompositionTimer] call blck_fnc_addObjToQue;
|
||||
[_blck_AllMissionAI,blck_AliveAICleanUpTime] call blck_fnc_addLiveAItoQue;
|
||||
[["end",_endMsg,_blck_localMissionMarker select 2]] call blck_fnc_messageplayers;
|
||||
[_blck_localMissionMarker select 1, _missionType] execVM "debug\missionCompleteMarker.sqf";
|
||||
[_blck_localMissionMarker select 0] execVM "debug\deleteMarker.sqf";
|
||||
[_blck_localMissionMarker select 0,"Completed"] call blck_fnc_updateMissionQue;
|
||||
diag_log format["[blckeagls] missionSpawner:: end of mission: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
|
@ -1,232 +0,0 @@
|
||||
/*
|
||||
Generic Mission Spawner
|
||||
for DBD Clan
|
||||
By Ghostrider-DBD-
|
||||
Copyright 2016
|
||||
Last modified 1/12/17
|
||||
*/
|
||||
|
||||
private ["_crates","_aiGroup","_objects","_groupPatrolRadius","_missionLandscape","_mines","_blck_AllMissionAI","_blck_localMissionMarker","_AI_Vehicles"];
|
||||
params["_coords","_missionType","_aiDifficultyLevel"];
|
||||
waitUntil {blck_missionSpawning isEqualTo false};
|
||||
blck_missionSpawning = true;
|
||||
diag_log format["[blckeagls] missionSpawner:: Initializing mission: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
|
||||
|
||||
private["_chanceHeliPatrol","_noPara","_reinforcementLootCounts","_chanceLoot","_heliCrew"];
|
||||
if (isNil "_chanceReinforcements") then
|
||||
{
|
||||
_chanceReinforcements = 0;
|
||||
_noPara = 0;
|
||||
_reinforcementLootCounts = [0,0,0,0,0,0];
|
||||
_chanceHeliPatrol = 0;
|
||||
_chanceLoot = 0;
|
||||
};
|
||||
|
||||
private["_timeOut","_blck_AllMissionAI"]; // _timeOut is the time in seconds after which a mission is deactivated.
|
||||
if (isNil "_markerColor") then {_markerColor = "ColorBlack"};
|
||||
if (isNil "_markerType") then {_markerType = ["mil_box",[]]};
|
||||
if (isNil "_timeOut") then {_timeOut = -1;};
|
||||
if (isNil "_noPara") then {_noPara = 0};
|
||||
if (isNil "_chanceHeliPatrol") then {_chanceHeliPatrol = 0;};
|
||||
if (isNil "_chanceLoot") then {_chanceLoot = 0};
|
||||
if (isNil "_heliCrew") then {_heliCrew = 3};
|
||||
|
||||
if (isNil "_reinforcementLootCounts") then
|
||||
{
|
||||
private["__weap","_mags","_backpacks","_optics","_loadout"];
|
||||
_weap = 2 + floor(random(4));
|
||||
_mags = 5 + floor(random(6));
|
||||
_backpacks = 1 + floor(random(2));
|
||||
_optics = 1 + floor(random(6));
|
||||
_loadout = 1 + floor(random(3));
|
||||
_reinforcementLootCounts = [_weap,_mags,_optics,0,0,_backpacks];
|
||||
if (blck_debugLevel > 0) then {diag_log "missionSpawner:: default values used for _reinforcementLootCounts";};
|
||||
}
|
||||
else
|
||||
{
|
||||
if (blck_debugLevel > 0) then {diag_log "missionSpawner:: Mission specific values used for _reinforcementLootCounts";};
|
||||
};
|
||||
|
||||
if (blck_debugLevel > 0) then {
|
||||
diag_log format["[blckEagle] Mission Reinforcement Parameters: changeReinforcements %1 numAI %2 changePatrol %3 chanceLoot %4",_chanceReinforcements,_noPara,_chanceHeliPatrol,_chanceLoot];
|
||||
};
|
||||
|
||||
private["_useMines","_abortMissionSpawner","_blck_AllMissionAI","_delayTime","_groupPatrolRadius"];
|
||||
if (isNil "_useMines") then {_useMines = blck_useMines;};
|
||||
|
||||
_objects = [];
|
||||
_mines = [];
|
||||
_crates = [];
|
||||
_aiGroup = [];
|
||||
_missionAIVehicles = [];
|
||||
_blck_AllMissionAI = [];
|
||||
_AI_Vehicles = [];
|
||||
_blck_localMissionMarker = [_missionType,_coords,"","",_markerColor,_markerType];
|
||||
_delayTime = 1;
|
||||
_groupPatrolRadius = 50;
|
||||
_abortMissionSpawner = false;
|
||||
|
||||
[_blck_localMissionMarker select 0,"Active",_coords] call blck_fnc_updateMissionQue;
|
||||
|
||||
if (blck_labelMapMarkers select 0) then
|
||||
{
|
||||
//diag_log "SM1.sqf: labeling map markers *****";
|
||||
_blck_localMissionMarker set [2, _markerMissionName];
|
||||
};
|
||||
if !(blck_preciseMapMarkers) then
|
||||
{
|
||||
//diag_log "SM1.sqf: 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?
|
||||
[["start",_startMsg,_blck_localMissionMarker select 2]] call blck_fnc_messageplayers;
|
||||
[_blck_localMissionMarker] execVM "debug\spawnMarker.sqf";
|
||||
|
||||
uiSleep 1;
|
||||
blck_missionSpawning = false;
|
||||
if (blck_debugLevel > 0) then {diag_log "missionSpawner:: waiting for player to trigger the mission";};
|
||||
private _missionStartTime = diag_tickTime;
|
||||
waitUntil{[_coords,blck_TriggerDistance,blck_MissionTimout] call blck_fnc_missionStartConditionsMet;};
|
||||
if (((diag_tickTime - _missionStartTime) > blck_MissionTimout)) exitWith
|
||||
{
|
||||
//["timeOut",_endMsg,_blck_localMissionMarker select 2] call blck_fnc_messageplayers;
|
||||
[_blck_localMissionMarker select 0] execVM "debug\deleteMarker.sqf";
|
||||
[_objects, 1] spawn blck_fnc_cleanupObjects;
|
||||
[_blck_localMissionMarker select 0,"Completed"] call blck_fnc_updateMissionQue;
|
||||
if (blck_debugLevel > 0) then
|
||||
{
|
||||
diag_log format["[blckeagls] missionSpawner:: Mission Timed Out: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
if (blck_debugLevel > 0) then
|
||||
{ diag_log format["[blckeagls] missionSpawner:: -- >> Mission tripped by nearby player: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
|
||||
};
|
||||
|
||||
if (count _missionLootBoxes > 0) then
|
||||
{
|
||||
_crates = [_coords,_missionLootBoxes] call blck_fnc_spawnMissionCrates;
|
||||
}
|
||||
else
|
||||
{
|
||||
_crates = [_coords,[[selectRandom blck_crateTypes /*"Box_NATO_Wps_F"*/,[0,0,0],_crateLoot,_lootCounts]]] call blck_fnc_spawnMissionCrates;
|
||||
|
||||
};
|
||||
|
||||
if (blck_debugLevel > 0) then
|
||||
{
|
||||
diag_log format["[blckeagls] missionSpawner:: Crates Spawned: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
|
||||
};
|
||||
|
||||
uiSleep _delayTime;
|
||||
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;
|
||||
_objects append _temp;
|
||||
};
|
||||
uiSleep _delayTime;
|
||||
if (_useMines) then
|
||||
{
|
||||
_mines = [_coords] call blck_fnc_spawnMines;
|
||||
uiSleep _delayTime;;
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
_objects append _temp;
|
||||
diag_log format["_fnc_missionSpawner::->> mission objects spawned = %1",_objects];
|
||||
|
||||
if (blck_debugON) then
|
||||
{
|
||||
diag_log format["[blckeagls] missionSpawner:: Landscape spawned: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
|
||||
};
|
||||
|
||||
uiSleep _delayTime;;
|
||||
|
||||
if ((count _missionLootVehicles) > 0) then // spawn loot vehicles
|
||||
{
|
||||
diag_log "[blckEagles] _fnc_missionSpawner:: Spawning Mission Loot Vehicles";
|
||||
private _vehs = [_missionLootVehicles] call blck_fnc_spawnMissionLootVehicles;
|
||||
};
|
||||
|
||||
uiSleep _delayTime;
|
||||
diag_log "[blckEagle] _fnc_missionSpawner:: spawning AI";
|
||||
_blck_AllMissionAI = [_coords,_minNoAI,_maxNoAI,_aiDifficultyLevel,_uniforms,_headGear] call blck_fnc_spawnMissionAI;
|
||||
diag_log format["[blckeagls] _fnc_missionSpawner (190):-> _blck_AllMissionAI = %1",_blck_AllMissionAI];
|
||||
if (blck_debugON) then
|
||||
{
|
||||
diag_log format["[blckeagls] missionSpawner:: AI Patrols Spawned: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
|
||||
};
|
||||
|
||||
uiSleep _delayTime;
|
||||
private _emp = [];
|
||||
diag_log format["[blckeagls] _fnc_missionSpawner (197):-> _noEmplacedWeapons = %1",_noEmplacedWeapons];
|
||||
if (!blck_useStatic && (_noEmplacedWeapons > 0)) then
|
||||
{
|
||||
private ["_emplacedGroup","_emplacedPositions"];
|
||||
|
||||
_emplacedPositions = [_coords,_count,35,50] call blck_fnc_findPositionsAlongARadius;
|
||||
//diag_log format["missionSpawner:: _emplacedPositions = %1",_emplacedPositions];
|
||||
{
|
||||
_emplacedGroup = [_x,1,1,_aiDifficultyLevel,_coords,1,2,_uniforms,_headGear] call blck_fnc_spawnGroup;
|
||||
if !(isNull _emplacedGroup) then
|
||||
{
|
||||
_blck_AllMissionAI = _blck_AllMissionAI + (units _emplacedGroup);
|
||||
_emplacedWeapon = [_x,_emplacedGroup,blck_staticWeapons,5,15] call blck_fnc_spawnEmplacedWeapon;
|
||||
_missionAIVehicles pushback _emplacedWeapon;
|
||||
uiSleep _delayTime;
|
||||
};
|
||||
}forEach _emplacedPositions;
|
||||
};
|
||||
if (blck_debugLevel > 0) then {diag_log format["[blckeagls] _fnc_missionSpawner (208):-> _blck_AllMissionAI = %1",_blck_AllMissionAI];};
|
||||
uiSleep _delayTime;
|
||||
if (blck_useVehiclePatrols && (_noVehiclePatrols > 0)) then
|
||||
{
|
||||
diag_log "[blckEagles] _fnc_missionSpawner:: spawning patrol vehicles";
|
||||
private _return = [_coords,_noVehiclePatrols,_aiDifficultyLevel,_uniforms,_headGear] call blck_fnc_spawnMissionVehiclePatrols;
|
||||
if (count _return isEqualTo 2) then
|
||||
{
|
||||
_blck_AllMissionAI = _blck_AllMissionAI + (_return select 0);
|
||||
_AI_Vehicles = _AI_Vehicles + (_return select 1);
|
||||
};
|
||||
};
|
||||
|
||||
if ((random(1) < _chanceReinforcements)) then
|
||||
{
|
||||
diag_log format["[blckeagls] missionSpawner:: calling in reinforcements: _heliCrew = %1",4];
|
||||
private["_grpPilot","_supplyHeli"];
|
||||
_grpPilot = createGroup blck_AI_Side;
|
||||
_grpPara = createGroup blck_AI_Side;
|
||||
if (!(isNulL _grpPilot) && !(isNull _grpPara)) then
|
||||
{
|
||||
//_supplyHeli = [_coords,_grpPilot,_chanceLoot] call blck_fnc_spawnMissionHeli;
|
||||
//[_coords,_grpPara,_noPara,_aiDifficultyLevel,_chanceLoot,_reinforcementLootCounts,_uniforms,_headgear,_supplyHeli,_grpPilot] spawn blck_fnc_callInReinforcements;
|
||||
} else { deleteGroup _grpPilot; deleteGroup _grpPara;};
|
||||
};
|
||||
|
||||
if (blck_debugON) then {diag_log "[blckeagls] _fnc_missionSpawner (214) :: waiting for mission completion criterion to be met";
|
||||
waitUntil{[_crates,_blck_AllMissionAI,_endCondition] call blck_fnc_missionEndConditionsMet;};
|
||||
if (blck_debugLevel > 0) then
|
||||
{
|
||||
diag_log format["[blckeagls] missionSpawner:: Mission completion criteria fulfilled: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
|
||||
};
|
||||
|
||||
if (blck_useSignalEnd) then
|
||||
{
|
||||
[_crates select 0] spawn blck_fnc_signalEnd;
|
||||
};
|
||||
[_mines] spawn blck_fnc_clearMines;
|
||||
[_objects, blck_cleanupCompositionTimer] call blck_fnc_addObjToQue;
|
||||
[_blck_AllMissionAI,blck_AliveAICleanUpTime] call blck_fnc_addLiveAItoQue;
|
||||
[["end",_endMsg,_blck_localMissionMarker select 2]] call blck_fnc_messageplayers;
|
||||
[_blck_localMissionMarker select 1, _missionType] execVM "debug\missionCompleteMarker.sqf";
|
||||
[_blck_localMissionMarker select 0] execVM "debug\deleteMarker.sqf";
|
||||
[_blck_localMissionMarker select 0,"Completed"] call blck_fnc_updateMissionQue;
|
||||
diag_log format["[blckeagls] missionSpawner:: end of mission: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
|
@ -1,20 +0,0 @@
|
||||
//////////////////////////////////////////////////////
|
||||
// test whether the start conditions for a mission have been met
|
||||
// returns true when either a player is within _range meters of _pos or the time elapsed is greater than _timeoutTime
|
||||
// by Ghostrider-DBD-
|
||||
// Last modified 1/12/17
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
params ["_pos","_range","_timeoutInterval","_endCondition"];
|
||||
private["_missionComplete","_timeoutTime"];
|
||||
_startTime = diag_tickTime;
|
||||
_timeoutTime = _startTime + _timeoutInterval;
|
||||
|
||||
if (blck_debugLevel isEqualTo 3) then
|
||||
{
|
||||
uiSleep 60;
|
||||
diag_log "_fnc_missionStartConditionsMet::-> bypassing start conditions with blck_debugLevel == 3";
|
||||
} else {
|
||||
waitUntil{uiSleep 1; (diag_tickTime - _startTime) > _timeoutTime || {(isPlayer _x) && (_pos distance _x) < _range} count allPlayers > 0};
|
||||
};
|
||||
true
|
@ -1,11 +0,0 @@
|
||||
/*
|
||||
[_blck_localMissionMarker, _coords, _objects] call blck_fnc_missionTimedOut;
|
||||
*/
|
||||
params["_blck_localMissionMarker", "_coords", "_objects"];
|
||||
|
||||
//["timeOut",_endMsg,_blck_localMissionMarker select 2] call blck_fnc_messageplayers;
|
||||
[_blck_localMissionMarker select 0] execVM "debug\deleteMarker.sqf";
|
||||
_blck_localMissionMarker set [1,[0,0,0]];
|
||||
_blck_localMissionMarker set [2,""];
|
||||
blck_ActiveMissionCoords = blck_ActiveMissionCoords - [ _coords];
|
||||
[_objects, 1] spawn blck_fnc_cleanupObjects;
|
@ -1,38 +0,0 @@
|
||||
/*
|
||||
test if either of two conditions is true:
|
||||
player within a specific range of the coordinates
|
||||
mission has timed out
|
||||
|
||||
By Ghostrider-DbD-
|
||||
1/21/17
|
||||
*/
|
||||
|
||||
|
||||
params["_coords"];
|
||||
private["_result"];
|
||||
#define GMS_playerInRange 1
|
||||
#define GMS_missionTimeOut 2
|
||||
|
||||
_result = 0;
|
||||
if (blck_debugLevel > 2) then
|
||||
{
|
||||
_result = GMS_playerInRange;
|
||||
diag_log format["_fnc_missionTriggeredConditionsMet:: -> Trigger conditions met with blck_debugLevel > 2 and _result set to %1",_result];
|
||||
} else {
|
||||
if ({ (isPlayer _x) && (_x distance _coords < blck_TriggerDistance) } count allPlayers > 0) then
|
||||
{
|
||||
_result = GMS_playerInRange;
|
||||
diag_log format["_fnc_missionTriggeredConditionsMet:: -> Trigger conditions met with player in range and _result set to %1",_result];
|
||||
|
||||
} else
|
||||
{
|
||||
if ((diag_tickTime - _missionStartTime) > blck_MissionTimout) then
|
||||
{
|
||||
_result = GMS_missionTimeOut;
|
||||
diag_log format["_fnc_missionTriggeredConditionsMet:: -> Trigger conditions met with mission timed out and _result set to %1",_result];
|
||||
};
|
||||
};
|
||||
};
|
||||
if (blck_debugLevel > 0) then {diag_log format["_fnc_missionTriggeredConditionsMet:: _result returned = %1 at time %2:",_result,_diag_tickTime];
|
||||
|
||||
_result
|
@ -1,23 +0,0 @@
|
||||
//////////////////////////////////////////////////////
|
||||
// Test whether one object (e.g., a player) is within a certain range of any of an array of other objects
|
||||
/*
|
||||
for DBD Clan
|
||||
By Ghostrider-DBD-
|
||||
Copyright 2016
|
||||
Last modified 1/22/2017
|
||||
*/
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
private ["_result"];
|
||||
params["_obj1","_objList","_minDist"];
|
||||
//_obj1 : player or other object
|
||||
// _objList : array of objects
|
||||
//_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 distance2D _obj1) < _minDist) exitWith {_result = true;};
|
||||
} forEach _objList;
|
||||
|
||||
_result
|
@ -1,19 +0,0 @@
|
||||
//////////////////////////////////////////////////////
|
||||
// Test whether one object (e.g., a player) is within a certain range of any of an array of other objects
|
||||
/*
|
||||
for DBD Clan
|
||||
By Ghostrider-DBD-
|
||||
Copyright 2016
|
||||
Last Modified 1/12/17
|
||||
*/
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
private ["_result"];
|
||||
params["_pos","_dist"];
|
||||
diag_log format["_fnc_playerInRange:: -> _pos = %1 and _dist = %2",_pos,_dist];
|
||||
_result = false;
|
||||
{
|
||||
if ((_x distance2D _pos) < _dist) exitWith {_result = true;};
|
||||
} forEach allPlayers;
|
||||
|
||||
_result
|
@ -1,48 +0,0 @@
|
||||
/*
|
||||
|
||||
[_missionEmplacedWeapons,_noEmplacedWeapons,_aiDifficultyLevel,_coords,_uniforms,_headGear] call blck_fnc_spawnMissionEmplacedWeapons;
|
||||
|
||||
*/
|
||||
|
||||
params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear",["_missionType","unspecified"]];
|
||||
private ["_emplacedGroup","_emplacedAI","_precise","_pos","_emplaced","_emp","_gunner","_staticWeap"];
|
||||
_emplacedAI = [];
|
||||
_staticWeap = [];
|
||||
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
|
||||
{
|
||||
_missionEmplacedWeapons = [_coords,_noEmplacedWeapons,35,50] call blck_fnc_findPositionsAlongARadius;
|
||||
_precise = false;
|
||||
if (blck_debugLevel > 1) then {diag_log "_fnc_spawnMissionEmplacedWeapons:: -->> no spawn points specified, using spawns along a radius";
|
||||
};
|
||||
diag_log format["_fnc_spawnMissionEmplacedWeapons:: (19) _missionType = %2 _missionEmplacedWeapons updated to %1",_missionEmplacedWeapons,_missionType];
|
||||
{
|
||||
diag_log format["_fnc_spawnMissionEmplacedWeapons:: (21) spawning group to man emplaced weapon"];
|
||||
_emplacedGroup = [_x,1,1,_aiDifficultyLevel,[0,0,0],1,2,_uniforms,_headGear] call blck_fnc_spawnGroup;
|
||||
diag_log format["_fnc_spawnMissionEmplacedWeapons:: (23) group spawned = %1",_emplacedGroup];
|
||||
_emplacedAI append (units _emplacedGroup);
|
||||
diag_log format["_fnc_spawnMissionEmplacedWeapons:: (24) _emplacedAI updated to = %1",_emplacedAI];
|
||||
|
||||
diag_log format["_fnc_spawnMissionEmplacedWeapons:: (26) spawning emplaced weapon"];
|
||||
if (_precise) then
|
||||
{
|
||||
_pos = _x;
|
||||
} else {
|
||||
_pos = [_x,5,10,0,0,20,0] call BIS_fnc_findSafePos;
|
||||
};
|
||||
|
||||
_emp = [selectRandom blck_staticWeapons,_pos,false] call blck_fnc_spawnVehicle;
|
||||
diag_log format["_fnc_spawnMissionEmplacedWeapons (33) spawnVehicle returned value of _emp = %1",_emp];
|
||||
_emp setVariable["DBD_vehType","emplaced"];
|
||||
_emp setPosATL _pos;
|
||||
[_emp,false] call blck_fnc_configureMissionVehicle;
|
||||
_gunner = (units _emplacedGroup) select 0;
|
||||
_gunner moveingunner _emp;
|
||||
_staticWeap pushback _emp;
|
||||
diag_log format["_fnc_spawnMissionEmplacedWeapons:: (28) emplaced weapon _wep = %1",_wep];
|
||||
}forEach _missionEmplacedWeapons;
|
||||
|
||||
_emplaced = [_staticWeap, _emplacedAI];
|
||||
|
||||
_emplaced
|
@ -1,5 +0,0 @@
|
||||
|
||||
|
||||
#define GMS_playerInRange 1
|
||||
#define GMS_missionTimeOut 2
|
||||
#defin GMS_delayTime 0.1
|
@ -1,23 +0,0 @@
|
||||
//////////////////////////////////////////////////////
|
||||
// Test whether one object (e.g., a player) is within a certain range of any of an array of other objects
|
||||
/*
|
||||
for DBD Clan
|
||||
By Ghostrider-DBD-
|
||||
Copyright 2016
|
||||
Last modified 1/22/2017
|
||||
*/
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
private ["_result"];
|
||||
params["_obj1","_objList","_minDist"];
|
||||
//_obj1 : player or other object
|
||||
// _objList : array of objects
|
||||
//_minDist : distance within which the function would return true;
|
||||
|
||||
_result = false;
|
||||
|
||||
{
|
||||
if ((_x distance2D _obj1) < _minDist) exitWith {_result = true;};
|
||||
} forEach _objList;
|
||||
diag_log format["objectInRange.sqf: _obj1 = %1, _objList = %2 _minDist = %3 _result = %4",_obj1,_objList,_minDist,_result];
|
||||
_result
|
@ -1,48 +0,0 @@
|
||||
/*
|
||||
|
||||
[_missionEmplacedWeapons,_noEmplacedWeapons,_aiDifficultyLevel,_coords,_uniforms,_headGear] call blck_fnc_spawnMissionEmplacedWeapons;
|
||||
|
||||
*/
|
||||
|
||||
params["_missionEmplacedWeapons","_noEmplacedWeapons","_aiDifficultyLevel","_coords","_uniforms","_headGear",["_missionType","unspecified"]];
|
||||
private ["_emplacedGroup","_emplacedAI","_precise","_pos","_emplaced","_emp","_gunner","_staticWeap"];
|
||||
_emplacedAI = [];
|
||||
_staticWeap = [];
|
||||
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
|
||||
{
|
||||
_missionEmplacedWeapons = [_coords,_noEmplacedWeapons,35,50] call blck_fnc_findPositionsAlongARadius;
|
||||
_precise = false;
|
||||
if (blck_debugLevel > 1) then {diag_log "_fnc_spawnMissionEmplacedWeapons:: -->> no spawn points specified, using spawns along a radius";
|
||||
};
|
||||
diag_log format["_fnc_spawnMissionEmplacedWeapons:: (19) _missionType = %2 _missionEmplacedWeapons updated to %1",_missionEmplacedWeapons,_missionType];
|
||||
{
|
||||
diag_log format["_fnc_spawnMissionEmplacedWeapons:: (21) spawning group to man emplaced weapon"];
|
||||
_emplacedGroup = [_x,1,1,_aiDifficultyLevel,[0,0,0],1,2,_uniforms,_headGear] call blck_fnc_spawnGroup;
|
||||
diag_log format["_fnc_spawnMissionEmplacedWeapons:: (23) group spawned = %1",_emplacedGroup];
|
||||
_emplacedAI append (units _emplacedGroup);
|
||||
diag_log format["_fnc_spawnMissionEmplacedWeapons:: (24) _emplacedAI updated to = %1",_emplacedAI];
|
||||
|
||||
diag_log format["_fnc_spawnMissionEmplacedWeapons:: (26) spawning emplaced weapon"];
|
||||
if (_precise) then
|
||||
{
|
||||
_pos = _x;
|
||||
} else {
|
||||
_pos = [_x,5,10,0,0,20,0] call BIS_fnc_findSafePos;
|
||||
};
|
||||
|
||||
_emp = [selectRandom blck_staticWeapons,_pos,false] call blck_fnc_spawnVehicle;
|
||||
diag_log format["_fnc_spawnMissionEmplacedWeapons (33) spawnVehicle returned value of _emp = %1",_emp];
|
||||
_emp setVariable["DBD_vehType","emplaced"];
|
||||
_emp setPosATL _pos;
|
||||
[_emp,false] call blck_fnc_configureMissionVehicle;
|
||||
_gunner = (units _emplacedGroup) select 0;
|
||||
_gunner moveingunner _emp;
|
||||
_staticWeap pushback _emp;
|
||||
diag_log format["_fnc_spawnMissionEmplacedWeapons:: (28) emplaced weapon _wep = %1",_wep];
|
||||
}forEach _missionEmplacedWeapons;
|
||||
|
||||
_emplaced = [_staticWeap, _emplacedAI];
|
||||
|
||||
_emplaced
|
@ -1,21 +0,0 @@
|
||||
/*
|
||||
|
||||
|
||||
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.
|
||||
damage: Number - Resulting level of damage for the selection.
|
||||
source: Object - The source unit that caused the damage.
|
||||
projectile: String - Classname of the projectile that caused inflicted the damage. ("" for unknown, such as falling damage.)
|
||||
|
||||
(Since Arma 3 v 1.49.131802)
|
||||
|
||||
hitPartIndex: Number - Hit part index of the hit point, -1 otherwise.
|
||||
*/
|
||||
|
||||
private ["_unit","_killer","_group","_deleteAI_At"];
|
||||
_unit = _this select 0;
|
||||
_source = _this select 3;
|
||||
|
||||
if (isPlayer _source) then {
|
||||
[_unit,_source] call GRMS_fnc_alertGroup;
|
||||
};
|
@ -1,17 +0,0 @@
|
||||
// Adds a bipod, optic and suppressor to AI weapons.
|
||||
// 11/11/16
|
||||
|
||||
_bipods = ["bipod_01_F_blk","bipod_01_F_mtp","bipod_01_F_snd","bipod_02_F_blk","bipod_02_F_hex","bipod_02_F_tan","bipod_03_F_blk","bipod_03_F_oli"];
|
||||
|
||||
params["_unit"];
|
||||
_wep = primaryWeapon _unit;
|
||||
_muzzles = = getArray (configFile >> "CfgWeapons" >> _wep >> "muzzles");
|
||||
_optics = configfile >> "CfgWeapons" >> _wep >> "WeaponSlotsInfo" >> "CowsSlot" >> "compatibleItems";
|
||||
|
||||
if (random 1 < 0.3) then {_unit addPrimaryWeaponItem (selectRandom _muzzles)};
|
||||
if (random 1 < 0.3) then {_unit addPrimaryWeaponItem (selectRandom _optics; _unit addPrimaryWeaponItem (selectRandom _bipods);};
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +0,0 @@
|
||||
// Not used
|
||||
// Retained for possible future update
|
||||
|
||||
_smgOptics = ["optic_Aco_smg","optic_ACO_grn_smg","optic_Holosight_smg"];
|
||||
_sniperOptics = ["optic_Nightstalker", "optic_SOS", "optic_LRPS", "optic_DMS"];
|
||||
_rifleOptics = ["optic_Aco","optic_ACO_grn","optic_Holosight","optic_Hamr","optic_Arco"];
|
@ -1,21 +0,0 @@
|
||||
/*
|
||||
|
||||
|
||||
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.
|
||||
damage: Number - Resulting level of damage for the selection.
|
||||
source: Object - The source unit that caused the damage.
|
||||
projectile: String - Classname of the projectile that caused inflicted the damage. ("" for unknown, such as falling damage.)
|
||||
|
||||
(Since Arma 3 v 1.49.131802)
|
||||
|
||||
hitPartIndex: Number - Hit part index of the hit point, -1 otherwise.
|
||||
*/
|
||||
|
||||
private ["_unit","_killer","_group","_deleteAI_At"];
|
||||
_unit = _this select 0;
|
||||
_source = _this select 3;
|
||||
|
||||
if (isPlayer _source) then {
|
||||
[_unit,_source] call GRMS_fnc_alertGroup;
|
||||
};
|
@ -1,23 +0,0 @@
|
||||
|
||||
/*
|
||||
Send player a mesage regarding reward for the kill.
|
||||
|
||||
*/
|
||||
|
||||
params["_killer","_distanceBonus"];
|
||||
private["_kills","_mt"];
|
||||
_mt = call blck_fnc_getModType;
|
||||
diag_log format["_fnc_sendRewardMessage:: -- >> _this = %1 and mod type = %2",_this, _mt];
|
||||
|
||||
if (_mt isEqualTo "Exile") then
|
||||
{
|
||||
_kills = getVariable [_killer,"ExileKills"];
|
||||
private _killerMsg = [];
|
||||
_killerMsg pushback "Enemy AI Killed";
|
||||
_killerMsg pushback _newKillerScore;
|
||||
_killerMsg pushback format["%1X Killstreak",_kills];
|
||||
_killerMsg pushback format["Killstreak Bonus %1",(_kills*2)];
|
||||
private _message = ["showFragRequest",_killerMsg];
|
||||
diag_log format ["_fnc_rewardKiller:: -- >> _killer %1 _kills %2 _distanceBonus %3 _killerMsg = %1",_killer, _kills, _distanceBonus, _killerMsg];
|
||||
_message remoteExecCall ["ExileClient_system_network_dispatchIncomingMessage", (owner _killer)];
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
/*
|
||||
by Ghostrider-Dbd-
|
||||
1/13/17
|
||||
*/
|
||||
params["_vehicle"];
|
||||
{
|
||||
_vehicle removeAllEventHandlers _x;
|
||||
}forEach ["GetIn","GetOut","Killed","Fired","HandleDamage","HandleHeal","FiredNear"];
|
||||
deleteVehicle _vehicle;
|
@ -1,20 +0,0 @@
|
||||
// Spawns an emplaced weapons, man's it, and saves it to an array of monitored vehicles.
|
||||
// by Ghostrider-DBD-
|
||||
// Last Updated 10-25-16
|
||||
|
||||
private["_emplaced","_safepos","_emp","_gunner"];
|
||||
params["_pos","_emplacedGroup","_emplacedTypes",["_minDist",20],["_maxDist",35] ];
|
||||
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;
|
||||
_emplaced = selectRandom _emplacedTypes;
|
||||
_emp = [_emplaced,_safepos] call blck_fnc_spawnVehicle;
|
||||
_emp setVariable["DBD_vehType","emplaced"];
|
||||
_gunner = (units _emplacedGroup) select 0;
|
||||
_gunner moveingunner _emp;
|
||||
[_emp] call blck_fnc_configureMissionVehicle;
|
||||
waitUntil { count crew _emp > 0};
|
||||
blck_missionVehicles pushback _emp;
|
||||
diag_log format["spawnEmplaced.sqf: Emplaced weapon %1 spawned"];
|
||||
|
||||
_emp
|
@ -1,29 +0,0 @@
|
||||
// Spawns an emplaced weapons, man's it, and saves it to an array of monitored vehicles.
|
||||
// by Ghostrider-DBD-
|
||||
// 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 "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;
|
||||
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;
|
||||
waitUntil { count crew _emp > 0};
|
||||
blck_missionVehicles pushback _emp;
|
||||
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
|
@ -1,68 +0,0 @@
|
||||
/*
|
||||
Handle the case that all AI assigned to a vehicle are dead.
|
||||
Allows players to enter and use the vehicle when appropriate
|
||||
or otherwise destroys the vehicle.
|
||||
|
||||
By Ghostrider-DBD-
|
||||
Copyright 2016
|
||||
Last updated 8-14-16
|
||||
*/
|
||||
|
||||
diag_log "----<< [blckeagls] VEHICLE MONITOR STARTED >>";
|
||||
while {true} do
|
||||
{
|
||||
private _vehList = blck_missionVehicles;
|
||||
uiSleep 3;
|
||||
{
|
||||
private ["_veh"];
|
||||
_veh = _x;
|
||||
|
||||
if ({alive _x} count crew _veh < 1) then
|
||||
{
|
||||
if (_veh getVariable["DBD_vehType","none"] isEqualTo "emplaced") then
|
||||
{
|
||||
[_veh] spawn {uiSleep 1;(_this select 0) setDamage 1;};
|
||||
blck_missionVehicles = blck_missionVehicles - [_veh];
|
||||
if (blck_debugOn) then{
|
||||
diag_log format["_fnc_vehicleMonitor:: deleting emplaced weapon %1",_veh];
|
||||
};
|
||||
}else {
|
||||
if (blck_killEmptyAIVehicles) then
|
||||
{
|
||||
blck_missionVehicles = blck_missionVehicles - [_veh];
|
||||
[_veh] spawn {
|
||||
params["_v"];
|
||||
//diag_log format["vehicleMonitor.sqf:: case of patrol vehicle: _veh %1 is about to be killed with getAllHitPointsDamage = %2",_v, (getAllHitPointsDamage _v)];
|
||||
uiSleep 20;
|
||||
{
|
||||
_v setHitPointDamage [_x, 1];
|
||||
//diag_log format["vehicleMonitor: hitpart %1 for vehicle %1 set to 1",_x,_v];
|
||||
} forEach ["HitLFWheel","HitLF2Wheel","HitRFWheel","HitRF2Wheel","HitEngine","HitLBWheel","HitLMWheel","HitRBWheel","HitRMWheel","HitTurret","HitGun","HitTurret","HitGun","HitTurret","HitGun","HitTurret","HitGun"];
|
||||
if (blck_debugLevel isEqualTo 3) then
|
||||
{
|
||||
diag_log format["_fnc_vehicleMonitor:: damage applied to a patrol vehicle -- >> current damage for vehicle %1 is = %2",_v, (getAllHitPointsDamage _v)];
|
||||
};
|
||||
uiSleep 60;
|
||||
if (blck_debugLevel isEqualTo 3) then {
|
||||
diag_log format["_fnc_vehicleMonitor:: case of patrol vehicle:deleting vehicle _veh",_v];
|
||||
};
|
||||
deleteVehicle _v;
|
||||
};
|
||||
} else {
|
||||
//diag_log format["vehicleMonitor.sqf: make vehicle available to players; stripping eventHandlers from_veh %1",_veh];
|
||||
blck_missionVehicles = blck_missionVehicles - [_veh];
|
||||
_veh removealleventhandlers "GetIn";
|
||||
_veh removealleventhandlers "GetOut";
|
||||
_veh setVehicleLock "UNLOCKED" ;
|
||||
if (blck_debugOn) then
|
||||
{
|
||||
diag_log format["_fnc_vehicleMonitor:: case of patrol vehicle released to players where vehicle = %1",_veh];
|
||||
};
|
||||
};
|
||||
};
|
||||
} else {
|
||||
_veh setVehicleAmmo 1;
|
||||
_veh setFuel 1;
|
||||
};
|
||||
}forEach _vehList;
|
||||
};
|
@ -2,7 +2,7 @@
|
||||
AI Mission for Epoch Mod for Arma 3
|
||||
By Ghostrider
|
||||
Functions and global variables used by the mission system.
|
||||
Last modified 1/12/17
|
||||
Last modified 1/23/17
|
||||
*/
|
||||
blck_functionsCompiled = false;
|
||||
|
||||
@ -19,10 +19,10 @@ blck_fnc_getModType = compileFinal preprocessFileLineNumbers "\q\addons\custom_
|
||||
blck_fnc_groupsOnAISide = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_GroupsOnAISide.sqf"; // Returns the number of groups on the side used by AI
|
||||
blck_fnc_emptyObject = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_emptyObject.sqf";
|
||||
blck_fnc_playerInRange = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_playerInRange.sqf";
|
||||
|
||||
// Player-related functions
|
||||
blck_fnc_rewardKiller = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_rewardKiller.sqf";
|
||||
blck_fnc_MessagePlayers = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_AIM.sqf"; // Send messages to players regarding Missions
|
||||
//blck_fnc_sendRewardMessage = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_sendRewardMessage.sqf";
|
||||
|
||||
// Mission-related functions
|
||||
blck_fnc_selectAILoadout = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_selectAILoadout.sqf";
|
||||
@ -30,7 +30,6 @@ blck_fnc_addMissionToQue = compileFinal preprocessFileLineNumbers "\q\addons\c
|
||||
blck_fnc_updateMissionQue = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_updateMissionQue.sqf"; //
|
||||
blck_fnc_addLiveAItoQue = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_addLiveAItoQue.sqf";
|
||||
blck_fnc_addObjToQue = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_addObjToQue.sqf"; //
|
||||
//blck_fnc_objectInRange = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_objectInRange.sqf";
|
||||
blck_fnc_missionTimer = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_missionTimer.sqf";
|
||||
blck_fnc_spawnCrate = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnCrate.sqf"; // Simply spawns a crate of a specified type at a specific position.
|
||||
blck_fnc_spawnMissionCrates = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMissionCrates.sqf";
|
||||
@ -38,7 +37,6 @@ blck_fnc_cleanupObjects = compileFinal preprocessFileLineNumbers "\q\addons\cus
|
||||
blck_fnc_spawnCompositionObjects = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnBaseObjects.sqf";
|
||||
blck_fnc_spawnRandomLandscape = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnRandomLandscape.sqf";
|
||||
blck_fnc_spawnMissionVehiclePatrols = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMissionVehiclePatrols.sqf";
|
||||
blck_fnc_spawnMissionEmplacedWeapons = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMissionEmplacedWeapons.sqf";
|
||||
blck_fnc_spawnEmplacedWeaponArray = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnEmplacedWeaponArray.sqf";
|
||||
blck_fnc_spawnMissionAI = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMissionAI.sqf";
|
||||
blck_fnc_spawnMissionLootVehicles = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_spawnMissionLootVehicles.sqf";
|
||||
@ -67,20 +65,17 @@ blck_fnc_setupWaypoints = compileFinal preprocessFileLineNumbers "\q\addons\cus
|
||||
blck_fnc_cleanEmptyGroups = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_cleanEmptyGroups.sqf"; // GMS_fnc_cleanEmptyGroups
|
||||
|
||||
// Functions specific to vehicles, whether wheeled or static
|
||||
//blck_fnc_spawnEmplacedWeapon = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnEmplacedWeapon.sqf";
|
||||
blck_fnc_spawnVehicle = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnVehicle.sqf";
|
||||
blck_fnc_spawnVehiclePatrol = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Vehicles\GMS_fnc_spawnVehiclePatrol.sqf";
|
||||
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";
|
||||
|
||||
// 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";
|
||||
blck_fnc_removeNVG = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Units\GMS_fnc_removeNVG.sqf";
|
||||
|
@ -6,8 +6,8 @@
|
||||
Last modified 10/25/16
|
||||
*/
|
||||
//blck_variablesLoaded = false;
|
||||
blck_debugON = false;
|
||||
blck_debugLevel = 0; // Sets level of detail for debugging info - WIP.
|
||||
blck_debugON = true;
|
||||
blck_debugLevel = 2; // Sets level of detail for debugging info - WIP.
|
||||
blck_minFPS = 10;
|
||||
|
||||
////////////////////////////////////////////////
|
||||
|
@ -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.
|
||||
Ideas or code from that by Vampire and KiloSwiss have been used for certain functions.
|
||||
|
||||
1/23/17 Version 6.54 Build 33
|
||||
Fixed typos in GMS_fnc_vehicleMonitor.sqf
|
||||
Removed a few files that are not used or needed.
|
||||
Removed some code that had been commented out from blck_functions.sqf.
|
||||
|
||||
1/22/17 Version 6.54 build 32
|
||||
Changed code to test for conditions that trigger to spawn mission objects and AI completely
|
||||
Rewrote the code for spawning emplaced weapons from scratch.
|
||||
|
||||
1/22/17 Version 6.54 build 30
|
||||
Fixed an error in how the waitTime till a mission was respawned after being updated to inactive status.
|
||||
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.
|
||||
|
15
README.md
15
README.md
@ -1,5 +1,5 @@
|
||||
Blckegls mission system (BEMS) Ver 6.44
|
||||
Build 15
|
||||
Blckegls mission system Ver 6.54
|
||||
Build 33
|
||||
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.
|
||||
|
||||
* Installation: Please refer to Installation.txt for a detailed description of installation and what you need to add to BE filters.
|
||||
@ -11,17 +11,20 @@ Included is an updated version of blckeagls mission system. This began as an eff
|
||||
Epoch Mod developer team.
|
||||
blckeagls - Mission system 2.0.2
|
||||
Narines - bug fixes and improvements.
|
||||
Bill (DBD Clan) example compositions.
|
||||
cyncrwler for help with troubleshooting and testing
|
||||
Bill (DBD Clan) for example compositions.
|
||||
cyncrwler, Grahamme and many others for help with troubleshooting and testing
|
||||
Brian Soanes for performance fixes and general guidance.
|
||||
|
||||
* Additional Credits include authors of other missions systems who's work influenced this update:
|
||||
* Additional Credits include authors of other missions systems who's work influenced this update.
|
||||
I have indicated as best as possible where work was directly derived from their contributions.:
|
||||
KiloSwiss (SEM)
|
||||
Hogscrapper (HC missions for A3)
|
||||
the Vampire (DZMS and VEMF)
|
||||
The FUCHS (EMS)
|
||||
lazylink (the original mission system)
|
||||
Matt11 (Wicked AI) Updates:
|
||||
|
||||
Face (A3EAI/A3XAI)
|
||||
|
||||
* Compatability
|
||||
Works well with VEMF, SEM, and A3AI all running on the same server.
|
||||
|
||||
|
@ -4,6 +4,11 @@ Loosely based on the AI mission system by blckeagls ver 2.0.2
|
||||
Contributions by Narines: bug fixes, testing, infinite ammo fix.
|
||||
Ideas or code from that by Vampire and KiloSwiss have been used for certain functions.
|
||||
|
||||
1/23/17 Version 6.54 Build 33
|
||||
Fixed typos in GMS_fnc_vehicleMonitor.sqf
|
||||
Removed a few files that are not used or needed.
|
||||
Removed some code that had been commented out from blck_functions.sqf.
|
||||
|
||||
1/22/17 Version 6.54 build 32
|
||||
Changed code to test for conditions that trigger to spawn mission objects and AI completely
|
||||
Rewrote the code for spawning emplaced weapons from scratch.
|
||||
|
Loading…
Reference in New Issue
Block a user