New features and many bug fixes
See Changelog for details.
This commit is contained in:
parent
1fa6aaee1a
commit
573b0f1ef1
@ -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_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,23 +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";
|
||||
};
|
||||
|
||||
{
|
||||
[_x] execVM "debug\spawnMarker.sqf";
|
||||
}forEach blck_customMarkers;
|
||||
|
||||
diag_log "-- >> Custom Markers Loaded";
|
@ -19,12 +19,15 @@ while {true} do
|
||||
};
|
||||
}forEach blck_liveMissionAI;
|
||||
{
|
||||
//diag_log format["mainThread::-->> missionObjects _x = %1",_x];
|
||||
if (diag_tickTime > (_x select 1) ) then {
|
||||
//diag_log format["_fnc_mainTread:: cleaning up mission objects %1",_x];
|
||||
[_x select 0] call blck_fnc_cleanupObjects;
|
||||
};
|
||||
}forEach blck_oldMissionObjects;
|
||||
[] call GMS_fnc_cleanupDeadAI;
|
||||
//[] call blck_fnc_timeAcceleration;
|
||||
//if (blck_useHC) then {[] call blck_fnc_monitorHC;};
|
||||
/*
|
||||
{
|
||||
if (_x select 6 > 0) then // The mission is not running, check the time left till it is spawned
|
||||
|
@ -0,0 +1,23 @@
|
||||
/*
|
||||
Check if an HC is connected and if so transfer some AI to it.
|
||||
By Ghostrider-DbD-
|
||||
Last modified 11-8-16
|
||||
*/
|
||||
|
||||
private _hc = missionNamespace getVariable["HC1","null"];
|
||||
diag_log format["monitorHC::->> _hc = %1",_hc];
|
||||
if !( (typeName _hc isEqualTo "OBJECT" || _hc isEqualTo "null") ) exitWith {};
|
||||
|
||||
if (typeOf _hc isEqualTo "HeadlessClient_F") then // a valid headless client is connected
|
||||
{
|
||||
private _hcOwner = owner _hc;
|
||||
private _xfered = 0;
|
||||
{
|
||||
if (!(isPlayer _x) && (groupOwner _x != _hcOwner) ) then {
|
||||
_x setGroupOwner (_hcOwner);
|
||||
_xfered = +1;
|
||||
diag_log format["monitorHC::-->> group %1 transfered to HC1",_x];
|
||||
};
|
||||
if (_xfered isEqualTo 6) exitWith {};
|
||||
}forEach allGroups;
|
||||
};
|
@ -3,7 +3,7 @@
|
||||
for DBD Clan
|
||||
By Ghostrider-DBD-
|
||||
Copyright 2016
|
||||
Last Modified 9-4-16
|
||||
Last Modified 11-11-16
|
||||
Fill a crate with items
|
||||
*/
|
||||
|
||||
@ -27,8 +27,21 @@
|
||||
// Add some randomly selected weapons and corresponding magazines
|
||||
for "_i" from 1 to _wepCnt do {
|
||||
_item = selectRandom _a1;
|
||||
_crate addWeaponCargoGlobal [_item select 0,1];
|
||||
_crate addMagazineCargoGlobal [_item select 1, 1 + round(random(3))];
|
||||
if (typeName _item isEqualTo "ARRAY") then // Check whether weapon name is part of an array that might also specify an ammo to use
|
||||
{
|
||||
_crate addWeaponCargoGlobal [_item select 0,1]; // if yes then assume the first element in the array is the weapon name
|
||||
if (count _item >1) then { // if the array has more than one element assume the second is the ammo to use.
|
||||
_crate addMagazineCargoGlobal [_item select 1, 1 + round(random(3))];
|
||||
} else { // if the array has only one element then lets load random ammo for it
|
||||
_crate addMagazineCargoGlobal [selectRandom (getArray (configFile >> "CfgWeapons" >> (_item select 0) >> "magazines")), 1 + round(random(3))];
|
||||
};
|
||||
} else {
|
||||
if (_item isKindOf ["Rifle", configFile >> "CfgWeapons"]) then
|
||||
{
|
||||
_crate addWeaponCargoGlobal [_item, 1];
|
||||
_crate addMagazineCargoGlobal [selectRandom (getArray (configFile >> "CfgWeapons" >> _item >> "magazines")), 1 + round(random(3))];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
if (_magCnt > 0) then
|
||||
|
@ -0,0 +1,443 @@
|
||||
/*
|
||||
Generic Mission Spawner
|
||||
for DBD Clan
|
||||
By Ghostrider-DBD-
|
||||
Copyright 2016
|
||||
*/
|
||||
|
||||
|
||||
private ["_crates","_aiGroup","_objects","_vehicles","_groupPatrolRadius","_missionLandscape","_compositions","_missionCfg","_compSel","_mines","_blck_AllMissionAI","_blck_localMissionMarker","_AI_Vehicles"];
|
||||
|
||||
params["_coords","_missionType","_aiDifficultyLevel"];
|
||||
/*
|
||||
_aiDifficultyLevel = _this select 2; // "blue","red","green" and "orange"
|
||||
*/
|
||||
|
||||
// *************************
|
||||
|
||||
// Once the entire mission system can support timeout cleanup of vehicles (specifically the AI vehicle patrols) then each mission layout can define this varialbe. Until then disable timouts.
|
||||
|
||||
//////////////////////////////////
|
||||
// To simplify debugging and also reduce load on server besure only once instance of the mission spawner is initializing at a time.
|
||||
/////////////////////////////////
|
||||
|
||||
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"];
|
||||
if (isNil "_chanceReinforcements") then
|
||||
{
|
||||
_chanceReinforcements = 0;
|
||||
_noPara = 0;
|
||||
_reinforcementLootCounts = [0,0,0,0,0,0];
|
||||
_chanceHeliPatrol = 0;
|
||||
_chanceLoot = 0;
|
||||
};
|
||||
private["_timeOut"]; // _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 "_reinforcementLootCounts") then
|
||||
{
|
||||
_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];
|
||||
//diag_log "missionSpawner:: default values used for _reinforcementLootCounts";
|
||||
}
|
||||
else
|
||||
{
|
||||
//diag_log "missionSpawner:: Mission specific values used for _reinforcementLootCounts";
|
||||
};
|
||||
|
||||
if (blck_debugON) then {
|
||||
diag_log format["[blckEagle] Mission Reinforcement Parameters: changeReinforcements %1 numAI %2 changePatrol %3 chanceLoot %4",_chanceReinforcements,_noPara,_chanceHeliPatrol,_chanceLoot];
|
||||
};
|
||||
|
||||
private["_useMines"];
|
||||
if (isNil "_useMines") then {_useMines = blck_useMines; /*diag_log "[blckEagles] Using default setting for _useMines";*/};
|
||||
|
||||
_objects = [];
|
||||
_mines = [];
|
||||
_crates = [];
|
||||
_aiGroup = [];
|
||||
_missionAIVehicles = [];
|
||||
_blck_AllMissionAI = [];
|
||||
_AI_Vehicles = [];
|
||||
_blck_localMissionMarker = [_missionType,_coords,"","",_markerColor,_markerType];
|
||||
_delayTime = 1;
|
||||
_groupPatrolRadius = 50;
|
||||
|
||||
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";
|
||||
|
||||
_fn_timedOut = {
|
||||
params["_startTime"];
|
||||
private["_return"];
|
||||
_return = ( (diag_tickTime - _startTime) > blck_MissionTimout );
|
||||
_return;
|
||||
};
|
||||
_fn_playerWithinRange = {
|
||||
params["_pos"];
|
||||
private["_return"];
|
||||
_return = false;
|
||||
{
|
||||
if (isPlayer _x and _x distance _pos <= blck_TriggerDistance) then {_return = true};
|
||||
|
||||
}forEach playableunits;
|
||||
_return;
|
||||
};
|
||||
|
||||
uiSleep 1;
|
||||
/////////////////////////////
|
||||
// Everything has been set up for the mission and it is now waiting to be triggered by a nearby player or to time out.
|
||||
// Lets let other instances of the mission spawner know it is OK to go ahead
|
||||
////////////////////////////
|
||||
blck_missionSpawning = false;
|
||||
|
||||
//diag_log "missionSpawner:: waiting for player to trigger the mission";
|
||||
private["_wait","_missionStartTime","_playerInRange","_missionTimedOut"];
|
||||
_missionStartTime = diag_tickTime;
|
||||
_playerInRange = false;
|
||||
_missionTimedOut = false;
|
||||
_wait = true;
|
||||
while {_wait} do
|
||||
{
|
||||
if ([_coords] call _fn_playerWithinRange) then
|
||||
{
|
||||
_wait = false;
|
||||
_playerInRange = true;
|
||||
} else
|
||||
{
|
||||
if ((diag_tickTime - _missionStartTime) > blck_MissionTimout) then
|
||||
{
|
||||
_wait = false;
|
||||
_missionTimedOut = true;
|
||||
};
|
||||
};
|
||||
uiSleep 1;
|
||||
};
|
||||
//waitUntil{ { (isPlayer _x && _x distance _coords <= blck_TriggerDistance /*&& vehicle _x == _x*/) || ([_missionStartTime] call _fn_timedOut) } count playableunits > 0 };
|
||||
|
||||
if (blck_debugON) then
|
||||
{
|
||||
diag_log format["missionSpawner:: Mission Triggerred contition playerInRange %1 and timout = %2",_playerInRange, _missionTimedOut];
|
||||
};
|
||||
|
||||
if (!_playerInRange && _missionTimedOut) exitWith
|
||||
{
|
||||
//["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,""];
|
||||
[_objects, 1] spawn blck_fnc_cleanupObjects;
|
||||
if (blck_debugON) then
|
||||
{
|
||||
diag_log format["[blckeagls] missionSpawner:: Mission Timed Out: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
|
||||
};
|
||||
};
|
||||
|
||||
if (_playerInRange) then
|
||||
{
|
||||
if (blck_debugON) 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,_missionCfg select 2/* array of crates*/] call blck_fnc_spawnMissionCrates;
|
||||
}
|
||||
else
|
||||
{
|
||||
_crates = [_coords,[[selectRandom blck_crateTypes /*"Box_NATO_Wps_F"*/,[0,0,0],_crateLoot,_lootCounts]]] call blck_fnc_spawnMissionCrates;
|
||||
|
||||
};
|
||||
_objects = _objects + _crates;
|
||||
|
||||
if (blck_debugON) then
|
||||
{
|
||||
diag_log format["[blckeagls] missionSpawner:: Crates Spawned: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
|
||||
};
|
||||
|
||||
uiSleep _delayTime;
|
||||
|
||||
if (blck_SmokeAtMissions select 0) then // spawn a fire and smoke near the crate
|
||||
{
|
||||
private ["_temp"];
|
||||
_temp = [_coords,blck_SmokeAtMissions select 1] call blck_fnc_smokeAtCrates;
|
||||
_objects = _objects + _temp;
|
||||
};
|
||||
uiSleep _delayTime;
|
||||
if (_useMines) then
|
||||
{
|
||||
_mines = [_coords] call blck_fnc_spawnMines;
|
||||
//waitUntil{!(_mines isEqualTo [];);
|
||||
uiSleep _delayTime;;
|
||||
};
|
||||
uiSleep _delayTime;
|
||||
|
||||
if (_missionLandscapeMode isEqualTo "random") then
|
||||
{
|
||||
_objects = [_coords,_missionLandscape, 3, 15, 2] call blck_fnc_spawnRandomLandscape;
|
||||
} else {
|
||||
_objects = [_coords, round(random(360)),_missionLandscape,true] call blck_fnc_spawnCompositionObjects;
|
||||
};
|
||||
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 format["spawnMissionCVehicles.sqf _x = %1",_x];
|
||||
_offset = _x select 1; // offset relative to _coords at which to spawn the vehicle
|
||||
_pos = [(_coords select 0)+(_offset select 0),(_coords select 1) + (_offset select 1),(_coords select 2)+(_offset select 2)];
|
||||
_veh = [_x select 0 /* vehicle class name*/, _pos] call blck_fnc_spawnVehicle;
|
||||
_vehs pushback _veh;
|
||||
[_veh,_x select 2 /*loot array*/, _x select 3 /*array of values specifying number of items of each loot type to load*/] call blck_fnc_fillBoxes;
|
||||
}forEach _missionLootVehicles;
|
||||
uiSleep _delayTime;
|
||||
};
|
||||
|
||||
if (blck_useStatic && (_noEmplacedWeapons > 0)) then
|
||||
{
|
||||
private["_static","_count"];
|
||||
if ( count (_missionEmplacedWeapons) > 0 ) then
|
||||
{
|
||||
_static = _missionCfg select 4 select 1;
|
||||
_count = _missionCfg select 4 select 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
_static = blck_staticWeapons;
|
||||
_count = _noEmplacedWeapons;
|
||||
};
|
||||
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;
|
||||
//_emplacedUnits = units _emplacedGroup;
|
||||
_blck_AllMissionAI = _blck_AllMissionAI + (units _emplacedGroup);
|
||||
_emplacedWeapon = [_x,_emplacedGroup,blck_staticWeapons,5,15] call blck_fnc_spawnEmplacedWeapon;
|
||||
_missionAIVehicles pushback _emplacedWeapon;
|
||||
uiSleep _delayTime;
|
||||
}forEach _emplacedPositions;
|
||||
//diag_log format["missionSpawner:: emplaced weapons data: _AI_Vehicles %1 _blck_AllMissionAI %1",_AI_Vehicles,_blck_AllMissionAI];
|
||||
if (blck_debugON) then
|
||||
{
|
||||
diag_log format["[blckeagls] missionSpawner:: Static Weapons Spawned: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
|
||||
};
|
||||
};
|
||||
|
||||
//diag_log format["_fnc_missionSpawner:: after adding any static weapons, _blck_AllMissionAI is %1",_blck_AllMissionAI];
|
||||
if (blck_useVehiclePatrols && (_noVehiclePatrols > 0)) then
|
||||
{
|
||||
private["_vehGroup","_patrolVehicle","_vehiclePatrolSpawns"];
|
||||
_vehiclePatrolSpawns= [_coords,_noVehiclePatrols,45,60] call blck_fnc_findPositionsAlongARadius;
|
||||
diag_log format["missionSpawner:: _vehiclePatrolSpawns = %1",_vehiclePatrolSpawns];
|
||||
//for "_i" from 1 to _noVehiclePatrols do
|
||||
{
|
||||
_vehGroup = [_x,3,3,_aiDifficultyLevel,_coords,1,2,_uniforms,_headGear] call blck_fnc_spawnGroup;
|
||||
//diag_log format["missionSpawner:: group for AI Patrol vehicle spawn: group is %1 with units of %2",_vehGroup, units _vehGroup];
|
||||
_blck_AllMissionAI = _blck_AllMissionAI + (units _vehGroup);
|
||||
_randomVehicle = blck_AIPatrolVehicles call BIS_fnc_selectRandom;
|
||||
//diag_log format["missionSpawner:: vehicle selected is %1", _randomVehicle];
|
||||
_patrolVehicle = [_coords,_x,_randomVehicle,(_x distance _coords) -5,(_x distance _coords) + 5,_vehGroup] call blck_fnc_spawnVehiclePatrol;
|
||||
//diag_log format["missionSpawner:: patrol vehicle spawned was %1",_patrolVehicle];
|
||||
_vehGroup setVariable["groupVehicle",_patrolVehicle,true];
|
||||
//uiSleep _delayTime;
|
||||
_AI_Vehicles pushback _patrolVehicle;
|
||||
}forEach _vehiclePatrolSpawns;
|
||||
//diag_log format["missionSpawner:: vehicle patrols data: _AI_Vehicles %1 _blck_AllMissionAI %1",_AI_Vehicles,_blck_AllMissionAI];
|
||||
uiSleep _delayTime;
|
||||
if (blck_debugON) then
|
||||
{
|
||||
diag_log format["[blckeagls] missionSpawner:: Vehicle Patrols Spawned: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
|
||||
};
|
||||
};
|
||||
//diag_log format["_fnc_missionSpawner:: after adding any vehicle patrols, _blck_AllMissionAI is %1",_blck_AllMissionAI];
|
||||
//diag_log format["missionSpawner:: _noAIGroups = %1; spawning AI Groups now",_noAIGroups];
|
||||
|
||||
private["_unitsToSpawn","_unitsPerGroup","_ResidualUnits","_newGroup"];
|
||||
_unitsToSpawn = round(_minNoAI + round(random(_maxNoAI - _minNoAI)));
|
||||
_unitsPerGroup = floor(_unitsToSpawn/_noAIGroups);
|
||||
_ResidualUnits = _unitsToSpawn - (_unitsPerGroup * _noAIGroups);
|
||||
//diag_log format["missionSpawner:: _unitsToSpawn %1 ; _unitsPerGroup %2 _ResidualUnits %3",_unitsToSpawn,_unitsPerGroup,_ResidualUnits];
|
||||
switch (_noAIGroups) do
|
||||
{
|
||||
case 1: { // spawn the group near the mission center
|
||||
//params["_pos", ["_numai1",5], ["_numai2",10], ["_skillLevel","red"], "_center", ["_minDist",20], ["_maxDist",35], ["_uniforms",blck_SkinList], ["_headGear",blck_headgear] ];
|
||||
_newGroup = [_coords,_unitsToSpawn,_unitsToSpawn,_aiDifficultyLevel,_coords,3,18,_uniforms,_headGear] call blck_fnc_spawnGroup;
|
||||
_newAI = units _newGroup;
|
||||
_blck_AllMissionAI = _blck_AllMissionAI + _newAI;
|
||||
//diag_log format["missionSpawner: Spawning Groups: _noAIGroups=1 _newGroup=%1 _newAI = %2",_newGroup, _newAI];
|
||||
};
|
||||
case 2: {
|
||||
//diag_log format["missionSpawner: Spawning Groups: _noAIGroups=2"]; // spawn groups on either side of the mission area
|
||||
_groupLocations = [_coords,_noAIGroups,15,30] call blck_fnc_findPositionsAlongARadius;
|
||||
{
|
||||
private["_adjusttedGroupSize"];
|
||||
if (_ResidualUnits > 0) then
|
||||
{
|
||||
_adjusttedGroupSize = _unitsPerGroup + _ResidualUnits;
|
||||
_ResidualUnits = 0;
|
||||
} else {
|
||||
_adjusttedGroupSize = _unitsPerGroup;
|
||||
};
|
||||
_newGroup = [_x,_adjusttedGroupSize,_adjusttedGroupSize,_aiDifficultyLevel,_coords,1,12,_uniforms,_headGear] call blck_fnc_spawnGroup;
|
||||
_newAI = units _newGroup;
|
||||
_blck_AllMissionAI = _blck_AllMissionAI + _newAI;
|
||||
//diag_log format["missionSpawner: Spawning 2 Groups: _newGroup=%1 _newAI = %2",_newGroup, _newAI];
|
||||
}forEach _groupLocations;
|
||||
|
||||
};
|
||||
case 3: { // spawn one group near the center of the mission and the rest on the perimeter
|
||||
//diag_log format["missionSpawner: Spawning Groups: _noAIGroups=3"];
|
||||
_newGroup = [_coords,_unitsPerGroup + _ResidualUnits,_unitsPerGroup + _ResidualUnits,_aiDifficultyLevel,_coords,1,12,_uniforms,_headGear] call blck_fnc_spawnGroup;
|
||||
_newAI = units _newGroup;
|
||||
_blck_AllMissionAI = _blck_AllMissionAI + _newAI;
|
||||
//diag_log format["missionSpawner: Spawning Groups: _noAIGroups=3 _newGroup=%1 _newAI = %2",_newGroup, _newAI];
|
||||
_groupLocations = [_coords,2,20,35] call blck_fnc_findPositionsAlongARadius;
|
||||
{
|
||||
_newGroup = [_x,_unitsPerGroup,_unitsPerGroup,_aiDifficultyLevel,_coords,1,12,_uniforms,_headGear] call blck_fnc_spawnGroup;
|
||||
_newAI = units _newGroup;
|
||||
_blck_AllMissionAI = _blck_AllMissionAI + _newAI;
|
||||
//diag_log format["missionSpawner: Spawning 2 Groups:_newGroup=%1 _newAI = %2",_newGroup, _newAI];
|
||||
}forEach _groupLocations;
|
||||
|
||||
};
|
||||
default { // spawn one group near the center of the mission and the rest on the perimeter
|
||||
//diag_log format["missionSpawner: Spawning Groups: _noAIGroups=default"];
|
||||
_newGroup = [_coords,_unitsPerGroup + _ResidualUnits,_unitsPerGroup + _ResidualUnits,_aiDifficultyLevel,_coords,1,12,_uniforms,_headGear] call blck_fnc_spawnGroup;
|
||||
_newAI = units _newGroup;
|
||||
_blck_AllMissionAI = _blck_AllMissionAI + _newAI;
|
||||
//diag_log format["missionSpawner: Spawning Groups: _noAIGroups=%3 _newGroup=%1 _newAI = %2",_newGroup, _newAI,_noAIGroups];
|
||||
_groupLocations = [_coords,(_noAIGroups - 1),20,40] call blck_fnc_findPositionsAlongARadius;
|
||||
{
|
||||
_newGroup = [_x,_unitsPerGroup,_unitsPerGroup,_aiDifficultyLevel,_coords,1,12,_uniforms,_headGear] call blck_fnc_spawnGroup;
|
||||
_newAI = units _newGroup;
|
||||
_blck_AllMissionAI = _blck_AllMissionAI + _newAI;
|
||||
//diag_log format["missionSpawner: Spawning %3 Groups: _newGroup=%1 _newAI = %2",_newGroup, _newAI,_noAIGroups];
|
||||
}forEach _groupLocations;
|
||||
};
|
||||
};
|
||||
|
||||
if (blck_debugON) then
|
||||
{
|
||||
diag_log format["[blckeagls] missionSpawner:: AI Patrols Spawned: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
|
||||
};
|
||||
|
||||
if ((random(1) < _chanceReinforcements)) then
|
||||
{
|
||||
_weaponList = blck_WeaponList_Red;
|
||||
|
||||
switch (_aiDifficultyLevel) do {
|
||||
case "blue": {_weaponList = blck_WeaponList_Blue;};
|
||||
case "red": {_weaponList = blck_WeaponList_Red;};
|
||||
case "green": {_weaponList = blck_WeaponList_Green;};
|
||||
case "orange": {_weaponList = blck_WeaponList_Orange;};
|
||||
default {_weaponList = blck_WeaponList_Blue;};
|
||||
};
|
||||
|
||||
diag_log format["missionSpawner:: weaponList = %1",_weaponList];
|
||||
private["_grpReinforcements"];
|
||||
_grpReinforcements = grpNull;
|
||||
|
||||
diag_log format["[blckeagls] missionSpawner:: calling in reinforcements: Current mission: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
|
||||
[] spawn {
|
||||
//[_coords,_noPara,_aiDifficultyLevel,_chanceLoot,_reinforcementLootCounts,_weaponList,_uniforms,_headgear,_chanceHeliPatrol] call blck_fnc_Reinforcements;
|
||||
//waitUntil {_grpReinforcements != grpNull};
|
||||
//diag_log format["[blckeagls] missionSpawner::reinforcement spawner started: Current mission: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
|
||||
};
|
||||
if !(_grpReinforcements isEqualTo grpNull) then
|
||||
{
|
||||
_blck_AllMissionAI = _blck_AllMissionAI + (units _grpReinforcements);
|
||||
//diag_log format["missionSpawner:: _grpReinforcements = %1",_grpReinforcements];
|
||||
};
|
||||
};
|
||||
|
||||
// Trigger for mission end
|
||||
//diag_log format["[blckeagls] mission Spawner _endCondition = %1",_endCondition];
|
||||
private["_missionComplete"];
|
||||
_missionComplete = -1;
|
||||
|
||||
_endIfPlayerNear = false;
|
||||
_endIfAIKilled = false;
|
||||
_startTime = diag_tickTime;
|
||||
_missionTimedOut = false;
|
||||
|
||||
switch (_endCondition) do
|
||||
{
|
||||
case "playerNear": {_endIfPlayerNear = true;};
|
||||
case "allUnitsKilled": {_endIfAIKilled = true;};
|
||||
case "allKilledOrPlayerNear": {_endIfPlayerNear = true;_endIfAIKilled = true;};
|
||||
};
|
||||
//diag_log format["missionSpawner :: _endIfPlayerNear = %1 _endIfAIKilled= %2",_endIfPlayerNear,_endIfAIKilled];
|
||||
private["_locations"];
|
||||
_locations = [_coords] + _crates;
|
||||
|
||||
//diag_log format["missionSpawner:: Waiting for player to satisfy mission end criteria of _endIfPlayerNear %1 with _endIfAIKilled %2",_endIfPlayerNear,_endIfAIKilled];
|
||||
while {_missionComplete == -1} do
|
||||
{
|
||||
if (_endIfPlayerNear) then {
|
||||
if ( { (isPlayer _x) && ([_x,_locations,20] call blck_fnc_playerInRange) && (vehicle _x == _x) } count playableunits > 0) then {
|
||||
_missionComplete = 1;
|
||||
};
|
||||
};
|
||||
//diag_log format["missionSpawner:: count alive _blck_AllMissionAI = %1",{alive _x} count _blck_AllMissionAI];
|
||||
if (_endIfAIKilled) then {
|
||||
if (({alive _x} count _blck_AllMissionAI) < 1 ) then {
|
||||
_missionComplete = 1;
|
||||
//diag_log format["missionSpawner:: _blck_AllMissionAI = %1","testing case _endIfAIKilled"];
|
||||
};
|
||||
};
|
||||
uiSleep 2;
|
||||
};
|
||||
|
||||
if (blck_debugON) 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
|
||||
{
|
||||
//diag_log format["**** Minor\SM1.sqf:: _crate = %1",_crates select 0];
|
||||
[_crates select 0] spawn blck_fnc_signalEnd;
|
||||
|
||||
if (blck_debugON) 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] 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];
|
||||
};
|
@ -170,7 +170,7 @@ if (_playerInRange) then
|
||||
_crates = [_coords,[[selectRandom blck_crateTypes /*"Box_NATO_Wps_F"*/,[0,0,0],_crateLoot,_lootCounts]]] call blck_fnc_spawnMissionCrates;
|
||||
|
||||
};
|
||||
_objects = _objects + _crates;
|
||||
_objects append _crates;
|
||||
|
||||
if (blck_debugON) then
|
||||
{
|
||||
@ -183,7 +183,8 @@ if (_playerInRange) then
|
||||
{
|
||||
private ["_temp"];
|
||||
_temp = [_coords,blck_SmokeAtMissions select 1] call blck_fnc_smokeAtCrates;
|
||||
_objects = _objects + _temp;
|
||||
_objects append _temp;
|
||||
_temp = nil;
|
||||
};
|
||||
uiSleep _delayTime;
|
||||
if (_useMines) then
|
||||
@ -193,13 +194,17 @@ if (_playerInRange) then
|
||||
uiSleep _delayTime;;
|
||||
};
|
||||
uiSleep _delayTime;
|
||||
|
||||
_obj = [];
|
||||
if (_missionLandscapeMode isEqualTo "random") then
|
||||
{
|
||||
_objects = [_coords,_missionLandscape, 3, 15, 2] call blck_fnc_spawnRandomLandscape;
|
||||
_obj = [_coords,_missionLandscape, 3, 15, 2] call blck_fnc_spawnRandomLandscape;
|
||||
} else {
|
||||
_objects = [_coords, round(random(360)),_missionLandscape,true] call blck_fnc_spawnCompositionObjects;
|
||||
_obj = [_coords, floor(random(360)),_missionLandscape,true] call blck_fnc_spawnCompositionObjects;
|
||||
};
|
||||
//diag_log format["_fnc_missionSpawner::->> _obj = %1",_obj];
|
||||
_objects append _obj;
|
||||
//diag_log format["_fnc_missionSpawner::->> _objects = %1",_objects];
|
||||
_obj= nil;
|
||||
if (blck_debugON) then
|
||||
{
|
||||
diag_log format["[blckeagls] missionSpawner:: Landscape spawned: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
|
||||
@ -217,9 +222,9 @@ if (_playerInRange) then
|
||||
_vehs pushback _veh;
|
||||
[_veh,_x select 2 /*loot array*/, _x select 3 /*array of values specifying number of items of each loot type to load*/] call blck_fnc_fillBoxes;
|
||||
}forEach _missionLootVehicles;
|
||||
uiSleep _delayTime;
|
||||
|
||||
};
|
||||
|
||||
uiSleep _delayTime;
|
||||
if (blck_useStatic && (_noEmplacedWeapons > 0)) then
|
||||
{
|
||||
private["_static","_count"];
|
||||
@ -251,13 +256,13 @@ if (_playerInRange) then
|
||||
diag_log format["[blckeagls] missionSpawner:: Static Weapons Spawned: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
|
||||
};
|
||||
};
|
||||
|
||||
uiSleep _delayTime;
|
||||
//diag_log format["_fnc_missionSpawner:: after adding any static weapons, _blck_AllMissionAI is %1",_blck_AllMissionAI];
|
||||
if (blck_useVehiclePatrols && (_noVehiclePatrols > 0)) then
|
||||
{
|
||||
private["_vehGroup","_patrolVehicle","_vehiclePatrolSpawns"];
|
||||
_vehiclePatrolSpawns= [_coords,_noVehiclePatrols,45,60] call blck_fnc_findPositionsAlongARadius;
|
||||
diag_log format["missionSpawner:: _vehiclePatrolSpawns = %1",_vehiclePatrolSpawns];
|
||||
//diag_log format["missionSpawner:: _vehiclePatrolSpawns = %1",_vehiclePatrolSpawns];
|
||||
//for "_i" from 1 to _noVehiclePatrols do
|
||||
{
|
||||
_vehGroup = [_x,3,3,_aiDifficultyLevel,_coords,1,2,_uniforms,_headGear] call blck_fnc_spawnGroup;
|
||||
@ -280,7 +285,7 @@ if (_playerInRange) then
|
||||
};
|
||||
//diag_log format["_fnc_missionSpawner:: after adding any vehicle patrols, _blck_AllMissionAI is %1",_blck_AllMissionAI];
|
||||
//diag_log format["missionSpawner:: _noAIGroups = %1; spawning AI Groups now",_noAIGroups];
|
||||
|
||||
uiSleep _delayTime;
|
||||
private["_unitsToSpawn","_unitsPerGroup","_ResidualUnits","_newGroup"];
|
||||
_unitsToSpawn = round(_minNoAI + round(random(_maxNoAI - _minNoAI)));
|
||||
_unitsPerGroup = floor(_unitsToSpawn/_noAIGroups);
|
||||
@ -344,7 +349,7 @@ if (_playerInRange) then
|
||||
}forEach _groupLocations;
|
||||
};
|
||||
};
|
||||
|
||||
uiSleep _delayTime;
|
||||
if (blck_debugON) then
|
||||
{
|
||||
diag_log format["[blckeagls] missionSpawner:: AI Patrols Spawned: _cords %1 : _missionType %2 : _aiDifficultyLevel %3 _markerMissionName %4",_coords,_missionType,_aiDifficultyLevel,_markerMissionName];
|
||||
@ -362,7 +367,7 @@ if (_playerInRange) then
|
||||
default {_weaponList = blck_WeaponList_Blue;};
|
||||
};
|
||||
|
||||
diag_log format["missionSpawner:: weaponList = %1",_weaponList];
|
||||
//diag_log format["missionSpawner:: weaponList = %1",_weaponList];
|
||||
private["_grpReinforcements"];
|
||||
_grpReinforcements = grpNull;
|
||||
|
||||
|
@ -0,0 +1,43 @@
|
||||
/*
|
||||
Spawn objects from an array using offsects from a central location.
|
||||
The code provided by M3Editor EDEN has been addapted to add checks for vehicles, should they be present.
|
||||
Returns an array of spawned objects.
|
||||
version of 11/9/16
|
||||
*/
|
||||
//diag_log format["_fnc_spawnBaseObjects: _this = %1",_this];
|
||||
params["_center","_azi","_objects","_setVector"];
|
||||
//diag_log format["_fnc_spawnBaseObjects: _objs = %1",_objects];
|
||||
|
||||
private ["_newObjs"];
|
||||
|
||||
_newObjs = [];
|
||||
|
||||
{
|
||||
//diag_log format["_fnc_spawnBaseObjects::-->> _x = %1",_x];
|
||||
private _obj = (_x select 0) createVehicle [0,0,0];
|
||||
_newObjs pushback _obj;
|
||||
_obj setDir ( (_x select 2) + _azi);
|
||||
_obj setPosATL (_center vectorAdd (_x select 1));
|
||||
_obj enableSimulationGlobal true;
|
||||
_obj allowDamage true;
|
||||
// Lock any vehicles placed as part of the mission landscape. Note that vehicles that can be taken by players can be added via the mission template.
|
||||
if ( (typeOf _obj) isKindOf "LandVehicle" || (typeOf _obj) isKindOf "Air" || (typeOf _obj) isKindOf "Sea") then
|
||||
{
|
||||
//diag_log format["_fnc_spawnBaseObjects:: Locking vehicle of type %1",typeOf _obj];
|
||||
//_obj = _x select 0;
|
||||
_obj setVehicleLock "LOCKEDPLAYER";
|
||||
_obj addEventHandler ["GetIn",{ // forces player to be ejected if he/she tries to enter the vehicle
|
||||
private ["_theUnit"];
|
||||
_theUnit = _this select 2;
|
||||
_theUnit action ["Eject", vehicle _theUnit];
|
||||
hint "Use of this vehicle is forbidden";
|
||||
}];
|
||||
|
||||
clearItemCargoGlobal _obj;
|
||||
clearWeaponCargoGlobal _obj;
|
||||
clearMagazineCargoGlobal _obj;
|
||||
clearBackpackCargoGlobal _obj;
|
||||
};
|
||||
} forEach _objects;
|
||||
diag_log format["_fnc_spawnBaseObjects _newObjs = %1",_newObjs];
|
||||
_newObjs
|
@ -24,5 +24,5 @@ _objects = [];
|
||||
_objects pushback _wreck;
|
||||
sleep 0.1;
|
||||
} forEach _missionLandscape;
|
||||
|
||||
_objects;
|
||||
diag_log format["_fnc_spawnRandomLandscape::-->> _objects = %1",_objects];
|
||||
_objects
|
@ -1,29 +1,9 @@
|
||||
scriptName "otl7_Mapper.sqf";
|
||||
/*
|
||||
Author: Joris-Jan van 't Land, modified for ArmA3: Outlawz7
|
||||
|
||||
Description:
|
||||
Takes an array of data about a dynamic object template and creates the objects.
|
||||
|
||||
Parameter(s):
|
||||
_this select 0: position of the template - Array [X, Y, Z]
|
||||
_this select 1: azimuth of the template in degrees - Number
|
||||
_this select 2: object template script name - script
|
||||
(optional) _this select 3: set vector up - boolean
|
||||
|
||||
Example(s):
|
||||
_newComp = [(getPos this), (getDir this), "dyno_a3\doc\csat_guardpost01.sqf", false] call (compile (preprocessFileLineNumbers "dyno_a3\otl7_Mapper.sqf"));
|
||||
_newComp = [(getPos this), (getDir this), "dyno_a3\doc\csat_guardpost01.sqf", true] call (compile (preprocessFileLineNumbers "dyno_a3\otl7_Mapper.sqf"));
|
||||
|
||||
Modified by Ghostrider-DBD- for blckeagls mission system
|
||||
version of 11/9/16
|
||||
*/
|
||||
|
||||
private ["_rdm"];
|
||||
params["_pos","_azi","_objs","_setVector"];
|
||||
//_pos = _this select 0;
|
||||
//_azi = _this select 1;
|
||||
//_objs = _this select 2;
|
||||
//_setVector = _this select 3;
|
||||
params["_center","_azi","_objs","_setVector"];
|
||||
|
||||
|
||||
private ["_newObjs"];
|
||||
|
||||
@ -32,67 +12,33 @@ private ["_newObjs"];
|
||||
|
||||
_newObjs = [];
|
||||
|
||||
private ["_posX", "_posY"];
|
||||
_posX = _pos select 0;
|
||||
_posY = _pos select 1;
|
||||
|
||||
//Function to multiply a [2, 2] matrix by a [2, 1] matrix.
|
||||
private ["_multiplyMatrixFunc"];
|
||||
_multiplyMatrixFunc =
|
||||
{
|
||||
private ["_array1", "_array2", "_result"];
|
||||
_array1 = _this select 0;
|
||||
_array2 = _this select 1;
|
||||
|
||||
_result =
|
||||
[
|
||||
(((_array1 select 0) select 0) * (_array2 select 0)) + (((_array1 select 0) select 1) * (_array2 select 1)),
|
||||
(((_array1 select 1) select 0) * (_array2 select 0)) + (((_array1 select 1) select 1) * (_array2 select 1))
|
||||
];
|
||||
|
||||
_result
|
||||
};
|
||||
|
||||
for "_i" from 0 to ((count _objs) - 1) do
|
||||
{
|
||||
|
||||
private ["_obj", "_type", "_relPos", "_azimuth", "_fuel", "_damage", "_newObj"];
|
||||
_obj = _objs select _i;
|
||||
_type = _obj select 0;
|
||||
_relPos = _obj select 1;
|
||||
_azimuth = _obj select 2;
|
||||
private _object = (_x select 0) createVehicle [0,0,0];
|
||||
_newObjs pushback _object;
|
||||
_object setDir ( (_x select 2) + _azi);
|
||||
_object setPosATL (_center vectorAdd (_x select 1));
|
||||
_object enableSimulationGlobal true;
|
||||
_object allowDamage true;
|
||||
// Lock any vehicles placed as part of the mission landscape. Note that vehicles that can be taken by players can be added via the mission template.
|
||||
if ( (typeOf _object) isKindOf "LandVehicle" || (typeOf _object) isKindOf "Air" || (typeOf _object) isKindOf "Sea") then
|
||||
{
|
||||
diag_log format["MAP ADDONS:: Locking vehicle of type %1",typeOf _object];
|
||||
//_object = _x select 0;
|
||||
_object setVehicleLock "LOCKEDPLAYER";
|
||||
_object addEventHandler ["GetIn",{ // forces player to be ejected if he/she tries to enter the vehicle
|
||||
private ["_theUnit"];
|
||||
_theUnit = _this select 2;
|
||||
_theUnit action ["Eject", vehicle _theUnit];
|
||||
hint "Use of this vehicle is forbidden";
|
||||
}];
|
||||
|
||||
//Optionally map fuel and damage for backwards compatibility.
|
||||
if ((count _obj) > 3) then {_fuel = _obj select 3};
|
||||
if ((count _obj) > 4) then {_damage = _obj select 4};
|
||||
|
||||
//Rotate the relative position using a rotation matrix.
|
||||
private ["_rotMatrix", "_newRelPos", "_newPos"];
|
||||
_rotMatrix =
|
||||
[
|
||||
[cos _azi, sin _azi],
|
||||
[-(sin _azi), cos _azi]
|
||||
];
|
||||
_newRelPos = [_rotMatrix, _relPos] call _multiplyMatrixFunc;
|
||||
|
||||
//Backwards compatability causes for height to be optional.
|
||||
private ["_z"];
|
||||
if ((count _relPos) > 2) then {_z = _relPos select 2} else {_z = 0};
|
||||
|
||||
_newPos = [_posX + (_newRelPos select 0), _posY + (_newRelPos select 1), _z];
|
||||
|
||||
//Create the object and make sure it's in the correct location.
|
||||
_newObj = _type createVehicle _newPos;
|
||||
_newObj setDir (_azi + _azimuth);
|
||||
_newObj setPos _newPos;
|
||||
if (_setVector) then {_newObj setVectorUp [0,0,1];};
|
||||
|
||||
//If fuel and damage were grabbed, map them.
|
||||
if (!isNil "_fuel") then {_newObj setFuel _fuel};
|
||||
if (!isNil "_damage") then {_newObj setDamage _damage};
|
||||
|
||||
_newObjs = _newObjs + [_newObj];
|
||||
clearItemCargoGlobal _object;
|
||||
clearWeaponCargoGlobal _object;
|
||||
clearMagazineCargoGlobal _object;
|
||||
clearBackpackCargoGlobal _object;
|
||||
};
|
||||
} forEach _objects;
|
||||
_newObjs
|
||||
|
||||
};
|
||||
|
||||
_newObjs
|
@ -1,12 +1,11 @@
|
||||
// time.sqf
|
||||
// by CRE4MPIE
|
||||
// GamersInc.NET 2015
|
||||
// Creds to AWOL, A3W, LouD for inspiration
|
||||
// GMS_fnc_time.sqf
|
||||
// by Ghostrider-DBD_
|
||||
//
|
||||
// Creds to AWOL, A3W, LouD and Creampie for insights.
|
||||
|
||||
if (!isServer) exitWith {};
|
||||
private["_startTime"];
|
||||
_startTime = diag_tickTime;
|
||||
if (!isServer) exitWith {};
|
||||
diag_log "[blckeagls] Time Acceleration Begun ----- >>>>>";
|
||||
_world = toLower format ["%1", worldName];
|
||||
private["_nightAccel","_dayAccel","_duskAccel"];
|
||||
switch (_world) do {
|
||||
@ -16,14 +15,13 @@ switch (_world) do {
|
||||
case "tanoa":{_nightAccel = 12; _dayAccel = 3.2;_duskAccel = 6;};
|
||||
};
|
||||
|
||||
while {true} do
|
||||
{
|
||||
switch (sunOrMoon) do {
|
||||
switch (sunOrMoon) do {
|
||||
// Nighttime
|
||||
case {sunOrMoon < 0.1}: {setTimeMultiplier _nightAccel; diag_log format["time accel updated to %1; sunOrMoon = %2; time of day = %3",_nightAccel,sunOrMoon,dayTime];};
|
||||
// Daylight
|
||||
case {sunOrMoon > 0.5}: {setTimeMultiplier _dayAccel;diag_log format["time accel updated to %1; sunOrMoon = %2; time of day = %3",_dayAccel,sunOrMoon,dayTime];};
|
||||
// Dusk
|
||||
default {setTimeMultiplier _duskAccel;diag_log format["time accel updated to %1; sunOrMoon = %2; time of day = %3",_duskAccel,sunOrMoon,dayTime];};
|
||||
};
|
||||
uiSleep 300;
|
||||
};
|
||||
diag_log format["Time Acceleration Module Loaded in %1 seconds",(diag_tickTime - _startTime)];
|
||||
|
||||
|
@ -0,0 +1,17 @@
|
||||
// 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);};
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -15,8 +15,8 @@ blck_deadAI pushback _unit;
|
||||
_group = group _unit;
|
||||
[_unit] joinSilent grpNull;
|
||||
if (count(units _group) < 1) then {deleteGroup _group;};
|
||||
[_unit] spawn blck_fnc_removeLaunchers;
|
||||
[_unit] spawn blck_fnc_removeNVG;
|
||||
if (blck_launcherCleanup) then {[_unit] spawn blck_fnc_removeLaunchers;};
|
||||
if (blck_removeNVG) then {[_unit] spawn blck_fnc_removeNVG;};
|
||||
if !(isPlayer _killer) exitWith {};
|
||||
[_unit,_killer] call blck_fnc_alertNearbyUnits;
|
||||
_isLegal = [_unit,_killer] call blck_fnc_processIlleagalAIKills;
|
||||
@ -44,7 +44,7 @@ if (blck_useKilledAIName) then
|
||||
_message = format["[blck] %1 killed with %2 from %3 meters",name _killer,getText(configFile >> "CfgWeapons" >> _weapon >> "DisplayName"), round(_unit distance _killer)];
|
||||
};
|
||||
_message =_message + _killstreakMsg;
|
||||
diag_log format["[blck] unit killed message is %1",_message,""];
|
||||
//diag_log format["[blck] unit killed message is %1",_message,""];
|
||||
["aikilled",_message,"victory"] call blck_fnc_messageplayers;
|
||||
{
|
||||
_unit removeAllEventHandlers _x;
|
||||
|
@ -1,8 +1,9 @@
|
||||
params["_unit"];
|
||||
|
||||
removeVest _unit;
|
||||
//removeHeadgear _this;
|
||||
removeHeadgear _unit;
|
||||
removeGoggles _unit;
|
||||
removeAllItems _unit;
|
||||
removeAllWeapons _unit;
|
||||
removeBackpackGlobal _unit;
|
||||
removeUniform _unit;
|
||||
|
@ -1,42 +1,23 @@
|
||||
/*
|
||||
by Ghostrider
|
||||
8-13-16
|
||||
11-11-16
|
||||
*/
|
||||
|
||||
private["_launcher","_launcherRounds","_objects","_weapons","_container"];
|
||||
params["_unit"]; // = _this select 0;
|
||||
_launcher = _unit getVariable ["Launcher",""];
|
||||
//diag_log format["#- removeLauncher.sqf -# called for unit %1",_unit];
|
||||
if (blck_launcherCleanup) then
|
||||
_unit removeWeapon _Launcher;
|
||||
if (_launcher != "") then
|
||||
{
|
||||
if (_launcher != "") then
|
||||
_unit removeWeapon _Launcher;
|
||||
{
|
||||
//diag_log format["!----! removing launchers for unit %1",_unit];
|
||||
_launcherRounds = getArray (configFile >> "CfgWeapons" >> _Launcher >> "magazines"); //0;
|
||||
_unit removeWeapon _Launcher;
|
||||
removeBackpack _unit;
|
||||
/*
|
||||
{
|
||||
if(_x in _launcherRounds) then {
|
||||
_unit removeMagazine _x;
|
||||
};
|
||||
} count magazines _unit;
|
||||
private["_objects","_weapons","_container"];
|
||||
{
|
||||
// https://community.bistudio.com/wiki/weaponsItems
|
||||
if (_launcher in (weaponsItems _x select 1) then {deleteVehicle _x};
|
||||
}forEach nearestObjects [getPos _unit,["WeaponHolderSimulated", "GroundWeaponHolder"],7];
|
||||
*/
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_launcher != "") then
|
||||
{
|
||||
{
|
||||
if (_launcher in weaponCargo _x) exitWith {
|
||||
deleteVehicle _x;
|
||||
}forEach nearestObjects [getPos _unit,["WeaponHolderSimulated", "GroundWeaponHolder"],7];
|
||||
_unit addWeaponGlobal _launcher;
|
||||
};
|
||||
};
|
||||
} forEach ((getPosATL _unit) nearObjects ["WeaponHolderSimulated",10]);
|
||||
_launcherRounds = getArray (configFile >> "CfgWeapons" >> _Launcher >> "magazines"); //0;
|
||||
{
|
||||
if(_x in _launcherRounds) then {_unit removeMagazine _x;};
|
||||
} count magazines _unit;
|
||||
};
|
||||
|
||||
|
@ -35,7 +35,7 @@ if (_modType isEqualTo "Epoch") then
|
||||
if (_dist > 800) then { _reward = _maxReward - (_maxReward / 4); _reward };
|
||||
|
||||
_reward=+(_kills*2);
|
||||
diag_log format["fnd_rewardKiller:: _bonus returned will be %1",_reward];
|
||||
//diag_log format["fnd_rewardKiller:: _bonus returned will be %1",_reward];
|
||||
[_killer,_reward] call blck_fnc_giveTakeCrypto;
|
||||
};
|
||||
};
|
||||
|
@ -13,25 +13,25 @@ private ["_pos","_i","_weap","_ammo","_other","_skin","_aiGroup","_ai1","_magazi
|
||||
|
||||
params["_pos","_weaponList","_aiGroup",["_skillLevel","red"],["_Launcher","none"],["_uniforms", blck_SkinList],["_headGear",blck_headgear],["_underwater",false]];
|
||||
//_pos = _this select 0; // Position at which to spawn AI
|
||||
//_weaponList = _this select 1;
|
||||
//_weaponList = _this select 1; // List of weapons with which to arm the AI
|
||||
//_aiGroup = _this select 2; // Group to which AI belongs
|
||||
//_skillLevel = [_this,3,"red"] call BIS_fnc_param; // Assign a skill level in case one was not passed."blue", "red", "green", "orange"
|
||||
//_Launcher = [_this, 4, "none"] call BIS_fnc_param; // Set launchers to "none" if no setting was passed.
|
||||
//_uniforms = [_this, 5, blck_SkinList] call BIS_fnc_param;
|
||||
//_headGear = [_this, 6, _shemag] call BIS_fnc_param;//_headGear
|
||||
//_uniforms = [_this, 5, blck_SkinList] call BIS_fnc_param; // skins to add to AI
|
||||
//_headGear = [_this, 6, _shemag] call BIS_fnc_param;// headGear to add to AI
|
||||
|
||||
_ai1 = ObjNull;
|
||||
_modType = call blck_getModType;
|
||||
if (_modType isEqualTo "Epoch") then
|
||||
{
|
||||
"I_Soldier_EPOCH" createUnit [_pos, _aiGroup, "_ai1 = this", 0.7, "COLONEL"];
|
||||
switch(_skillLevel) do
|
||||
/*switch(_skillLevel) do
|
||||
{
|
||||
case "blue":{_ai1 setVariable["Crypto",floor(random(blck_maxMoneyBlue)),true];};
|
||||
case "red":{_ai1 setVariable["Crypto",floor(random(blck_maxMoneyRed)),true];};
|
||||
case "green":{_ai1 setVariable["Crypto",floor(random(blck_maxMoneyGreen)),true];};
|
||||
case "orange":{_ai1 setVariable["Crypto",floor(random(blck_maxMoneyOrange)),true];};
|
||||
};
|
||||
case "blue":{_ai1 setVariable["Crypto",1 + floor(random(blck_maxMoneyBlue)),true];};
|
||||
case "red":{_ai1 setVariable["Crypto",2 + floor(random(blck_maxMoneyRed)),true];};
|
||||
case "green":{_ai1 setVariable["Crypto",3 + floor(random(blck_maxMoneyGreen)),true];};
|
||||
case "orange":{_ai1 setVariable["Crypto",4 + floor(random(blck_maxMoneyOrange)),true];};
|
||||
}; */
|
||||
};
|
||||
if (_modType isEqualTo "Exile") then
|
||||
{
|
||||
@ -45,9 +45,17 @@ if (_modType isEqualTo "Exile") then
|
||||
};
|
||||
};
|
||||
[_ai1] call blck_fnc_removeGear;
|
||||
_skin = selectRandom _uniforms; // call BIS_fnc_selectRandom;
|
||||
_ai1 forceAddUniform _skin;
|
||||
|
||||
_skin = "";
|
||||
_counter = 1;
|
||||
while {_skin isEqualTo "" && _counter < 10} do
|
||||
{
|
||||
_skin = selectRandom _uniforms; // call BIS_fnc_selectRandom;
|
||||
//_ai1 forceAddUniform _skin;
|
||||
_ai1 forceAddUniform _skin;
|
||||
_skin = uniform _ai1;
|
||||
//diag_log format["_fnc_spawnUnit::-->> for unit _ai1 % uniform is %2",_ai1, uniform _ai1];
|
||||
_counter =+1;
|
||||
};
|
||||
//Stops the AI from being cleaned up
|
||||
_ai1 setVariable["DBD_AI",1];
|
||||
|
||||
@ -69,78 +77,69 @@ if (_modType isEqualTo "Epoch") then
|
||||
|
||||
_ai1 addHeadgear (selectRandom _headGear);
|
||||
// Add a vest to AI for storage
|
||||
_vest = selectRandom blck_vests; // call BIS_fnc_selectRandom;
|
||||
_ai1 addVest _vest;
|
||||
//_vest = selectRandom blck_vests; // call BIS_fnc_selectRandom;
|
||||
_ai1 addVest selectRandom blck_vests;
|
||||
|
||||
if ( random (1) < blck_chanceBackpack) then
|
||||
{
|
||||
_bpck = selectRandom blck_backpack; // call BIS_fnc_selectRandom;
|
||||
_ai1 addBackpack _bpck;
|
||||
//_bpck = selectRandom blck_backpack;
|
||||
_ai1 addBackpack selectRandom blck_backpacks;
|
||||
};
|
||||
|
||||
// Add a primary weapon : Vampires logic used here.
|
||||
_weap = selectRandom _weaponList; // call BIS_fnc_selectRandom;
|
||||
_weap = selectRandom _weaponList;
|
||||
|
||||
//diag_log format["[spawnUnit.sqf] _weap os %1",_weap];
|
||||
_ai1 addWeaponGlobal _weap;
|
||||
// get the ammo that can be used with this weapon. This function returns an array with all possible ammo choices in it.
|
||||
_ammoChoices = getArray (configFile >> "CfgWeapons" >> _weap >> "magazines");
|
||||
_ammo = selectRandom _ammoChoices; // call BIS_fnc_selectRandom;
|
||||
//_muzzles = = getArray (configFile >> "CfgWeapons" >> _weap >> "muzzles");
|
||||
_optics = getArray (configfile >> "CfgWeapons" >> _weap >> "WeaponSlotsInfo" >> "CowsSlot" >> "compatibleItems");
|
||||
_legalOptics = [];
|
||||
{
|
||||
if !(_x in blck_blacklistedOptics) then {_legalOptics pushback _x};
|
||||
}forEach _optics;
|
||||
_ammo = selectRandom _ammoChoices;
|
||||
//diag_log format["[spawnUnit.sqf] _ammo returned as %1",_ammo];
|
||||
for "_i" from 2 to (floor(random 3)) do {
|
||||
_ai1 addMagazine _ammo;
|
||||
};
|
||||
//if (random 1 < 0.3) then {_unit addPrimaryWeaponItem (selectRandom _muzzles)};
|
||||
if (random 1 < 0.3) then {
|
||||
_ai1 addPrimaryWeaponItem (selectRandom _legalOptics);
|
||||
};
|
||||
if (random 1 < 0.3) then {
|
||||
_ai1 addPrimaryWeaponItem (selectRandom blck_bipods);
|
||||
};
|
||||
// If the weapon has a GL, add some rounds for it: based on Vampires code
|
||||
if ((count(getArray (configFile >> "cfgWeapons" >> _weap >> "muzzles"))) > 1) then {
|
||||
_ai1 addMagazine "1Rnd_HE_Grenade_shell";
|
||||
};
|
||||
|
||||
// Add a pistol : Vampires logic used here.
|
||||
//_weap = selectRandom _pistols; // call BIS_fnc_selectRandom;
|
||||
_weap = selectRandom blck_Pistols;
|
||||
//_ai1 setVariable["PrimaryWeap",_weap];
|
||||
|
||||
//diag_log format["[spawnUnit.sqf] _weap os %1",_weap];
|
||||
_ai1 addWeaponGlobal _weap;
|
||||
|
||||
// get the ammo that can be used with this weapon. This function returns an array with all possible ammo choices in it.
|
||||
_ammoChoices = getArray (configFile >> "CfgWeapons" >> _weap >> "magazines");
|
||||
_ammo = selectRandom _ammoChoices; // call BIS_fnc_selectRandom;
|
||||
//diag_log format["[spawnUnit.sqf] _ammo returned as %1",_ammo];
|
||||
_ai1 addMagazine _ammo;
|
||||
_ai1 addMagazine selectRandom _ammoChoices;
|
||||
|
||||
//adds 3 random items to AI. _other = ["ITEM","COUNT"]
|
||||
_noItems = floor(random(3));
|
||||
for "_i" from 1 to _noItems do {
|
||||
//add random items to AI. _other = ["ITEM","COUNT"]
|
||||
for "_i" from 1 to (1+floor(random(3))) do {
|
||||
_i = _i + 1;
|
||||
//_ai1 addItem (selectRandom _aiConsumableItems);
|
||||
_ai1 addItem (selectRandom blck_ConsumableItems);
|
||||
};
|
||||
|
||||
// Add an First Aid or Grenade 50% of the time
|
||||
if (round(random 10) <= 5) then
|
||||
{
|
||||
//_item = selectRandom _specialItems; // call BIS_fnc_selectRandom;
|
||||
_item = selectRandom blck_specialItems;
|
||||
//_item = selectRandom blck_specialItems;
|
||||
//diag_log format["spawnUnit.sqf] -- Item is %1", _item];
|
||||
_ai1 addItem _item;
|
||||
_ai1 addItem selectRandom blck_specialItems;
|
||||
};
|
||||
|
||||
if (_Launcher != "none") then
|
||||
{
|
||||
private["_bpck"];
|
||||
//diag_log format["spawnUnit.sqf: Available Launcher Rounds are %1",getArray (configFile >> "CfgWeapons" >> _Launcher >> "magazines")];
|
||||
_ai1 addWeaponGlobal _Launcher;
|
||||
_launcherRound = getArray (configFile >> "CfgWeapons" >> _Launcher >> "magazines") select 0;
|
||||
//diag_log format["[spawnUnit.sqf] Launcher round is %1",_launcherRound];
|
||||
for "_i" from 1 to 3 do
|
||||
{
|
||||
//diag_log format["[spawnUnit.saf] Adding Launcher Round %1 ",_launcherRound];
|
||||
//private["_round"];
|
||||
//_round = selectRandom _launcherRound;
|
||||
_ai1 addItemToBackpack _launcherRound call BIS_fnc_selectRandom;
|
||||
_ai1 addItemToBackpack (getArray (configFile >> "CfgWeapons" >> _Launcher >> "magazines") select 0); // call BIS_fnc_selectRandom;
|
||||
};
|
||||
_ai1 selectWeapon (secondaryWeapon _ai1);
|
||||
_ai1 setVariable["Launcher",_launcher];
|
||||
};
|
||||
|
||||
@ -157,8 +156,6 @@ else
|
||||
|
||||
// Infinite ammo
|
||||
_ai1 addeventhandler ["fired", {(_this select 0) setvehicleammo 1;}];
|
||||
|
||||
// Do something if AI is killed
|
||||
_ai1 addEventHandler ["killed",{ [(_this select 0), (_this select 1)] execVM 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;}];
|
||||
|
||||
@ -171,12 +168,12 @@ switch (_skillLevel) do
|
||||
default {_index = 0;_aiSkills = blck_SkillsBlue;};
|
||||
};
|
||||
|
||||
_alertDist = blck_AIAlertDistance select _index;
|
||||
_intelligence = blck_AIIntelligence select _index;
|
||||
//_alertDist = blck_AIAlertDistance select _index;
|
||||
//_intelligence = blck_AIIntelligence select _index;
|
||||
|
||||
[_ai1,_aiSkills] call blck_fnc_setSkill;
|
||||
_ai1 setVariable ["alertDist",_alertDist,true];
|
||||
_ai1 setVariable ["intelligence",_intelligence,true];
|
||||
_ai1 setVariable ["alertDist",blck_AIAlertDistance select _index,true];
|
||||
_ai1 setVariable ["intelligence",blck_AIIntelligence select _index,true];
|
||||
_ai1 setVariable ["GMS_AI",true,true];
|
||||
|
||||
_ai1
|
||||
|
@ -10,7 +10,7 @@ params["_vehType","_pos"];
|
||||
//_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];
|
||||
//diag_log format["spawnVehicle.sqf: _this = %1",_this];
|
||||
_veh = createVehicle[_vehType, _pos, [], 0, "NONE"];
|
||||
_modType = call blck_getModType;
|
||||
if (_modType isEqualTo "Epoch") then
|
||||
|
@ -1,9 +1,8 @@
|
||||
/*
|
||||
AI Mission for Epoch Mod for Arma 3
|
||||
For the Mission System originally coded by blckeagls
|
||||
By Ghostrider
|
||||
Functions and global variables used by the mission system.
|
||||
Last modified 2/10/16
|
||||
Last modified 11/10/16
|
||||
*/
|
||||
blck_functionsCompiled = false;
|
||||
|
||||
@ -13,6 +12,9 @@ blck_fnc_FindSafePosn = compileFinal preprocessFileLineNumbers "\q\addons\custo
|
||||
blck_fnc_randomPosition = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_randomPosn.sqf";// find a randomPosn. see script for details.
|
||||
blck_fnc_findPositionsAlongARadius = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_findPositionsAlongARadius.sqf";
|
||||
blck_fnc_giveTakeCrypto = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_giveTakeCrypto.sqf";
|
||||
blck_fnc_monitorHC = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Functions\GMS_fnc_monitorHC.sqf";
|
||||
blck_fnc_timeAcceleration = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\TimeAccel\GMS_fnc_Time.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
|
||||
@ -28,7 +30,7 @@ blck_fnc_playerInRange = compileFinal preprocessFileLineNumbers "\q\addons\cust
|
||||
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"; // Spawn loot crates at specific positions relative to the mission center; these will be filled with loot following the parameters in the composition array for the mission
|
||||
blck_fnc_cleanupObjects = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\GMS_fnc_cleanUpObjects.sqf";
|
||||
blck_fnc_spawnCompositionObjects = compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\Missions\otl7_Mapper.sqf";
|
||||
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_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
|
||||
|
@ -6,9 +6,9 @@
|
||||
Last modified 10/25/16
|
||||
*/
|
||||
//blck_variablesLoaded = false;
|
||||
blck_debugON = true;
|
||||
blck_debugON = false;
|
||||
blck_debugLevel = 3;
|
||||
blck_minFPS = 13;
|
||||
blck_minFPS = 10;
|
||||
|
||||
//Minimum distance for between missions
|
||||
MinDistanceFromMission = 1500;
|
||||
|
@ -26,7 +26,7 @@ Last modified 8/1/15
|
||||
***********************************************************/
|
||||
////////
|
||||
// Headless Client Configurations
|
||||
blck_useHC = true;
|
||||
blck_useHC = false; // Not Yet Working
|
||||
|
||||
// MISSION MARKER CONFIGURATION
|
||||
// blck_labelMapMarkers: Determines if when the mission composition provides text labels, map markers with have a text label indicating the mission type
|
||||
@ -124,10 +124,15 @@ Last modified 8/1/15
|
||||
|
||||
blck_chanceBackpack = 0.3; // Chance AI will be spawned with a backpack
|
||||
blck_useNVG = true; // When true, AI will be spawned with NVG if is dark
|
||||
blck_removeNVG = false; // When true, NVG will be removed from AI when they are killed.
|
||||
blck_useLaunchers = true; // When true, some AI will be spawned with RPGs; they do not however fire on vehicles for some reason so I recommend this be set to false for now
|
||||
//blck_launcherTypes = ["launch_NLAW_F","launch_RPG32_F","launch_B_Titan_F","launch_I_Titan_F","launch_O_Titan_F","launch_B_Titan_short_F","launch_I_Titan_short_F","launch_O_Titan_short_F"];
|
||||
blck_launcherTypes = ["launch_RPG32_F"];
|
||||
blck_backpack = ["B_Carryall_ocamo","B_Carryall_oucamo","B_Carryall_mcamo","B_Carryall_oli","B_Carryall_khk","B_Carryall_cbr" ];
|
||||
blck_baseBackpacks = ["B_Carryall_ocamo","B_Carryall_oucamo","B_Carryall_mcamo","B_Carryall_oli","B_Carryall_khk","B_Carryall_cbr" ];
|
||||
blck_ApexBackpacks = ["B_Bergen_mcamo_F","B_Bergen_dgtl_F","B_Bergen_hex_F","B_Bergen_tna_F","B_AssaultPack_tna_F","B_Carryall_ghex_F",
|
||||
"B_FieldPack_ghex_F","B_ViperHarness_blk_F","B_ViperHarness_ghex_F","B_ViperHarness_hex_F","B_ViperHarness_khk_F",
|
||||
"B_ViperHarness_oli_F","B_ViperLightHarness_blk_F","B_ViperLightHarness_ghex_F","B_ViperLightHarness_hex_F","B_ViperLightHarness_khk_F","B_ViperLightHarness_oli_F"];
|
||||
blck_backpacks = blck_baseBackpacks + blck_ApexBackpacks;
|
||||
blck_launchersPerGroup = 1; // Defines the number of AI per group spawned with a launcher
|
||||
blck_launcherCleanup = true;// When true, launchers and launcher ammo are removed from dead AI.
|
||||
|
||||
@ -137,8 +142,8 @@ Last modified 8/1/15
|
||||
// values are ordered as follows [blue, red, green, orange];
|
||||
blck_AliveAICleanUpTime = 900; // Time after mission completion at which any remaining live AI are deleted.
|
||||
blck_cleanupCompositionTimer = 1200;
|
||||
//blck_AIAlertDistance = [150,225,250,300];
|
||||
blck_AIAlertDistance = [150,225,400,500];
|
||||
blck_AIAlertDistance = [150,225,250,300];
|
||||
//blck_AIAlertDistance = [150,225,400,500];
|
||||
// How precisely player locations will be revealed to AI after an AI kill
|
||||
// values are ordered as follows [blue, red, green, orange];
|
||||
blck_AIIntelligence = [0.5, 1, 2, 4];
|
||||
@ -180,7 +185,7 @@ Last modified 8/1/15
|
||||
blck_SkillsBlue = [
|
||||
["aimingAccuracy",0.1],["aimingShake",0.25],["aimingSpeed",0.3],["endurance",0.50],["spotDistance",0.4],["spotTime",0.4],["courage",0.60],["reloadSpeed",0.60],["commanding",0.7],["general",0.60]
|
||||
];
|
||||
|
||||
// Add some money to AI; only works with Exile for now.
|
||||
blck_maxMoneyOrange = 25;
|
||||
blck_maxMoneyGreen = 20;
|
||||
blck_maxMoneyRed = 15;
|
||||
@ -192,43 +197,54 @@ Last modified 8/1/15
|
||||
AI WEAPONS, UNIFORMS, VESTS AND GEAR
|
||||
|
||||
**********************************************************************************/
|
||||
blck_RifleSniper = [
|
||||
"srifle_EBR_F","srifle_GM6_F","srifle_LRR_F","srifle_DMR_01_F"
|
||||
];
|
||||
|
||||
blck_RifleAsault = [
|
||||
"arifle_Katiba_F","arifle_Katiba_C_F","arifle_Katiba_GL_F","arifle_MXC_F","arifle_MX_F","arifle_MX_GL_F","arifle_MXM_F","arifle_SDAR_F",
|
||||
"arifle_TRG21_F","arifle_TRG20_F","arifle_TRG21_GL_F","arifle_Mk20_F","arifle_Mk20C_F","arifle_Mk20_GL_F","arifle_Mk20_plain_F","arifle_Mk20C_plain_F","arifle_Mk20_GL_plain_F"
|
||||
];
|
||||
// Blacklisted itesm
|
||||
blck_blacklistedOptics = ["optic_Nightstalker","optic_tws","optic_tws_mg"];
|
||||
|
||||
// AI Weapons and Attachments
|
||||
blck_bipods = ["bipod_01_F_blk","bipod_01_F_mtp","bipod_01_F_snd","bipod_02_F_blk","bipod_02_F_hex","bipod_02_F_tan","bipod_03_F_blk","bipod_03_F_oli"];
|
||||
|
||||
blck_RifleSniper = [
|
||||
"srifle_EBR_F","srifle_GM6_F","srifle_LRR_F","srifle_DMR_01_F"
|
||||
];
|
||||
|
||||
blck_RifleLMG = [
|
||||
"LMG_Mk200_F","LMG_Zafir_F"
|
||||
];
|
||||
blck_RifleAsault = [
|
||||
"arifle_Katiba_F","arifle_Katiba_C_F","arifle_Katiba_GL_F","arifle_MXC_F","arifle_MX_F","arifle_MX_GL_F","arifle_MXM_F","arifle_SDAR_F",
|
||||
"arifle_TRG21_F","arifle_TRG20_F","arifle_TRG21_GL_F","arifle_Mk20_F","arifle_Mk20C_F","arifle_Mk20_GL_F","arifle_Mk20_plain_F","arifle_Mk20C_plain_F","arifle_Mk20_GL_plain_F"
|
||||
];
|
||||
|
||||
blck_RifleOther = [
|
||||
"SMG_01_F","SMG_02_F"
|
||||
];
|
||||
blck_RifleLMG = [
|
||||
"LMG_Mk200_F","LMG_Zafir_F"
|
||||
];
|
||||
|
||||
blck_Pistols = [
|
||||
"hgun_PDW2000_F","hgun_ACPC2_F","hgun_Rook40_F","hgun_P07_F","hgun_Pistol_heavy_01_F","hgun_Pistol_heavy_02_F","hgun_Pistol_Signal_F"
|
||||
];
|
||||
|
||||
blck_DLC_MMG = [
|
||||
"MMG_01_hex_F","MMG_02_sand_F","MMG_01_tan_F","MMG_02_black_F","MMG_02_camo_F"
|
||||
];
|
||||
|
||||
blck_DLC_Sniper = [
|
||||
"srifle_DMR_02_camo_F","srifle_DMR_02_F","srifle_DMR_02_sniper_F","srifle_DMR_03_F","srifle_DMR_03_tan_F","srifle_DMR_04_F","srifle_DMR_04_Tan_F","srifle_DMR_05_blk_F","srifle_DMR_05_hex_F","srifle_DMR_05_tan_F","srifle_DMR_06_camo_F","srifle_DMR_06_olive_F"
|
||||
];
|
||||
|
||||
blck_RifleOther = [
|
||||
"SMG_01_F","SMG_02_F"
|
||||
];
|
||||
|
||||
blck_Pistols = [
|
||||
"hgun_PDW2000_F","hgun_ACPC2_F","hgun_Rook40_F","hgun_P07_F","hgun_Pistol_heavy_01_F","hgun_Pistol_heavy_02_F","hgun_Pistol_Signal_F"
|
||||
];
|
||||
|
||||
blck_DLC_MMG = [
|
||||
"MMG_01_hex_F","MMG_02_sand_F","MMG_01_tan_F","MMG_02_black_F","MMG_02_camo_F"
|
||||
];
|
||||
|
||||
blck_DLC_Sniper = [
|
||||
"srifle_DMR_02_camo_F","srifle_DMR_02_F","srifle_DMR_02_sniper_F","srifle_DMR_03_F","srifle_DMR_03_tan_F","srifle_DMR_04_F","srifle_DMR_04_Tan_F","srifle_DMR_05_blk_F","srifle_DMR_05_hex_F","srifle_DMR_05_tan_F","srifle_DMR_06_camo_F","srifle_DMR_06_olive_F"
|
||||
];
|
||||
blck_apexWeapons = ["arifle_AK12_F","arifle_AK12_GL_F","arifle_AKM_F","arifle_AKM_FL_F","arifle_AKS_F","arifle_ARX_blk_F","arifle_ARX_ghex_F","arifle_ARX_hex_F","arifle_CTAR_blk_F","arifle_CTAR_hex_F",
|
||||
"arifle_CTAR_ghex_F","arifle_CTAR_GL_blk_F","arifle_CTARS_blk_F","arifle_CTARS_hex_F","arifle_CTARS_ghex_F","arifle_SPAR_01_blk_F","arifle_SPAR_01_khk_F","arifle_SPAR_01_snd_F",
|
||||
"arifle_SPAR_01_GL_blk_F","arifle_SPAR_01_GL_khk_F","arifle_SPAR_01_GL_snd_F","arifle_SPAR_02_blk_F","arifle_SPAR_02_khk_F","arifle_SPAR_02_snd_F","arifle_SPAR_03_blk_F",
|
||||
"arifle_SPAR_03_khk_F","arifle_SPAR_03_snd_F","arifle_MX_khk_F","arifle_MX_GL_khk_F","arifle_MXC_khk_F","arifle_MXM_khk_F"];
|
||||
|
||||
//This defines the random weapon to spawn on the AI
|
||||
//https://community.bistudio.com/wiki/Arma_3_CfgWeapons_Weapons
|
||||
blck_WeaponList_Orange = blck_RifleSniper + blck_RifleAsault + blck_RifleLMG + blck_DLC_Sniper + blck_DLC_MMG;
|
||||
blck_WeaponList_Green = blck_RifleSniper + blck_RifleAsault +blck_RifleLMG + blck_DLC_MMG;
|
||||
blck_WeaponList_Orange = blck_RifleSniper + blck_RifleAsault + blck_RifleLMG + blck_DLC_Sniper + blck_DLC_MMG + blck_apexWeapons;
|
||||
blck_WeaponList_Green = blck_RifleSniper + blck_RifleAsault +blck_RifleLMG + blck_DLC_MMG + blck_apexWeapons;
|
||||
blck_WeaponList_Blue = blck_RifleOther + blck_RifleAsault +blck_RifleLMG;
|
||||
blck_WeaponList_Red = blck_RifleOther + blck_RifleSniper + blck_RifleAsault + blck_RifleLMG;
|
||||
|
||||
blck_headgear = ["H_Shemag_khk","H_Shemag_olive","H_Shemag_tan","H_ShemagOpen_khk"]; blck_BanditHeadgear = ["H_Shemag_khk","H_Shemag_olive","H_Shemag_tan","H_ShemagOpen_khk"];
|
||||
|
||||
blck_BanditHeadgear = ["H_Shemag_khk","H_Shemag_olive","H_Shemag_tan","H_ShemagOpen_khk"];
|
||||
//This defines the skin list, some skins are disabled by default to permit players to have high visibility uniforms distinct from those of the AI.
|
||||
blck_headgear = [
|
||||
"H_Cap_blk",
|
||||
@ -442,24 +458,13 @@ for examples of how you can do this see \Major\Compositions.sqf
|
||||
["MultiGun","EnergyPackLg"],
|
||||
["arifle_Katiba_F","30Rnd_65x39_caseless_green"],
|
||||
["arifle_Katiba_GL_F","30Rnd_65x39_caseless_green"],
|
||||
["arifle_Mk20_F","30Rnd_556x45_Stanag"],
|
||||
["arifle_Mk20_plain_F","30Rnd_556x45_Stanag"],
|
||||
["arifle_Mk20C_F","30Rnd_556x45_Stanag"],
|
||||
["arifle_Mk20_GL_F","30Rnd_556x45_Stanag"],
|
||||
["arifle_Mk20_GL_plain_F","30Rnd_556x45_Stanag"],
|
||||
["arifle_MX_F","30Rnd_65x39_caseless_mag"],
|
||||
["arifle_MXC_F","30Rnd_65x39_caseless_mag"],
|
||||
["arifle_MXM_F","30Rnd_65x39_caseless_mag"],
|
||||
["arifle_SDAR_F","20Rnd_556x45_UW_mag"],
|
||||
["arifle_TRG20_F","30Rnd_556x45_Stanag"],
|
||||
["m16_EPOCH","30Rnd_556x45_Stanag"],
|
||||
["m16Red_EPOCH","30Rnd_556x45_Stanag"],
|
||||
["M14_EPOCH","20Rnd_762x51_Mag"],
|
||||
["M14Grn_EPOCH","20Rnd_762x51_Mag"],
|
||||
["m4a3_EPOCH","30Rnd_556x45_Stanag"],
|
||||
["SMG_02_F","30Rnd_9x21_Mag"],
|
||||
["SMG_01_F","30Rnd_45ACP_Mag_SMG_01"],
|
||||
["Hgun_PDW2000_F","30Rnd_9x21_Mag"],
|
||||
["M14_EPOCH","20Rnd_762x51_Mag"],
|
||||
["M14Grn_EPOCH","20Rnd_762x51_Mag"],
|
||||
["arifle_MXM_F","30Rnd_65x39_caseless_mag_Tracer"],
|
||||
@ -470,9 +475,6 @@ for examples of how you can do this see \Major\Compositions.sqf
|
||||
["srifle_LRR_F","7Rnd_408_Mag"],
|
||||
["srifle_EBR_F","20Rnd_762x51_Mag"],
|
||||
["srifle_GM6_F","5Rnd_127x108_APDS_Mag"],
|
||||
["m249_EPOCH","200Rnd_556x45_M249"],
|
||||
["m249Tan_EPOCH","200Rnd_556x45_M249"],
|
||||
["LMG_Mk200_F","200Rnd_65x39_cased_Box_Tracer"],
|
||||
["Arifle_MX_SW_F","100Rnd_65x39_caseless_mag_Tracer"],
|
||||
["Arifle_MX_SW_Black_F","100Rnd_65x39_caseless_mag_Tracer"],
|
||||
["LMG_Zafir_F","150Rnd_762x51_Box_Tracer"],
|
||||
@ -492,7 +494,11 @@ for examples of how you can do this see \Major\Compositions.sqf
|
||||
["srifle_DMR_06_camo_F","10Rnd_338_Mag"],
|
||||
["srifle_DMR_04_F","10Rnd_127x54_Mag"],
|
||||
["srifle_DMR_05_blk_F","10Rnd_93x64_DMR_05_Mag"],
|
||||
["srifle_DMR_06_olive_F","20Rnd_762x51_Mag"]
|
||||
["srifle_DMR_06_olive_F","20Rnd_762x51_Mag"],
|
||||
"arifle_AK12_F","arifle_AK12_GL_F","arifle_AKM_F","arifle_AKM_FL_F","arifle_AKS_F","arifle_ARX_blk_F","arifle_ARX_ghex_F","arifle_ARX_hex_F","arifle_CTAR_blk_F","arifle_CTAR_hex_F",
|
||||
"arifle_CTAR_ghex_F","arifle_CTAR_GL_blk_F","arifle_CTARS_blk_F","arifle_CTARS_hex_F","arifle_CTARS_ghex_F","arifle_SPAR_01_blk_F","arifle_SPAR_01_khk_F","arifle_SPAR_01_snd_F",
|
||||
"arifle_SPAR_01_GL_blk_F","arifle_SPAR_01_GL_khk_F","arifle_SPAR_01_GL_snd_F","arifle_SPAR_02_blk_F","arifle_SPAR_02_khk_F","arifle_SPAR_02_snd_F","arifle_SPAR_03_blk_F",
|
||||
"arifle_SPAR_03_khk_F","arifle_SPAR_03_snd_F","arifle_MX_khk_F","arifle_MX_GL_khk_F","arifle_MXC_khk_F","arifle_MXM_khk_F"
|
||||
],
|
||||
[//Magazines
|
||||
["3rnd_HE_Grenade_Shell",3,6],
|
||||
@ -562,25 +568,12 @@ for examples of how you can do this see \Major\Compositions.sqf
|
||||
["MultiGun","EnergyPackLg"],
|
||||
["arifle_Katiba_F","30Rnd_65x39_caseless_green"],
|
||||
["arifle_Katiba_GL_F","30Rnd_65x39_caseless_green"],
|
||||
["arifle_Mk20_F","30Rnd_556x45_Stanag"],
|
||||
["arifle_Mk20_plain_F","30Rnd_556x45_Stanag"],
|
||||
["arifle_Mk20C_F","30Rnd_556x45_Stanag"],
|
||||
["arifle_Mk20_GL_F","30Rnd_556x45_Stanag"],
|
||||
["arifle_Mk20_GL_plain_F","30Rnd_556x45_Stanag"],
|
||||
["arifle_MX_F","30Rnd_65x39_caseless_mag"],
|
||||
["arifle_MX_GL_F","30Rnd_65x39_caseless_mag"],
|
||||
["arifle_MXC_F","30Rnd_65x39_caseless_mag"],
|
||||
["arifle_MXM_F","30Rnd_65x39_caseless_mag"],
|
||||
["arifle_SDAR_F","20Rnd_556x45_UW_mag"],
|
||||
["arifle_TRG20_F","30Rnd_556x45_Stanag"],
|
||||
["m16_EPOCH","30Rnd_556x45_Stanag"],
|
||||
["m16Red_EPOCH","30Rnd_556x45_Stanag"],
|
||||
["M14_EPOCH","20Rnd_762x51_Mag"],
|
||||
["M14Grn_EPOCH","20Rnd_762x51_Mag"],
|
||||
["m4a3_EPOCH","30Rnd_556x45_Stanag"],
|
||||
["SMG_02_F","30Rnd_9x21_Mag"],
|
||||
["SMG_01_F","30Rnd_45ACP_Mag_SMG_01"],
|
||||
["Hgun_PDW2000_F","30Rnd_9x21_Mag"],
|
||||
["M14_EPOCH","20Rnd_762x51_Mag"],
|
||||
["M14Grn_EPOCH","20Rnd_762x51_Mag"],
|
||||
["arifle_MXM_F","30Rnd_65x39_caseless_mag_Tracer"],
|
||||
@ -591,8 +584,6 @@ for examples of how you can do this see \Major\Compositions.sqf
|
||||
["srifle_LRR_F","7Rnd_408_Mag"],
|
||||
["srifle_EBR_F","20Rnd_762x51_Mag"],
|
||||
["srifle_GM6_F","5Rnd_127x108_APDS_Mag"],
|
||||
["m249_EPOCH","200Rnd_556x45_M249"],
|
||||
["m249Tan_EPOCH","200Rnd_556x45_M249"],
|
||||
["LMG_Mk200_F","200Rnd_65x39_cased_Box_Tracer"],
|
||||
["Arifle_MX_SW_F","100Rnd_65x39_caseless_mag_Tracer"],
|
||||
["Arifle_MX_SW_Black_F","100Rnd_65x39_caseless_mag_Tracer"],
|
||||
@ -602,7 +593,11 @@ for examples of how you can do this see \Major\Compositions.sqf
|
||||
["srifle_DMR_03_F","10Rnd_338_Mag"],
|
||||
["srifle_DMR_04_Tan_F","10Rnd_338_Mag"],
|
||||
["srifle_DMR_05_hex_F","10Rnd_338_Mag"],
|
||||
["srifle_DMR_06_camo_F","10Rnd_338_Mag"]
|
||||
["srifle_DMR_06_camo_F","10Rnd_338_Mag"],
|
||||
"arifle_AK12_F","arifle_AK12_GL_F","arifle_AKM_F","arifle_AKM_FL_F","arifle_AKS_F","arifle_ARX_blk_F","arifle_ARX_ghex_F","arifle_ARX_hex_F","arifle_CTAR_blk_F","arifle_CTAR_hex_F",
|
||||
"arifle_CTAR_ghex_F","arifle_CTAR_GL_blk_F","arifle_CTARS_blk_F","arifle_CTARS_hex_F","arifle_CTARS_ghex_F","arifle_SPAR_01_blk_F","arifle_SPAR_01_khk_F","arifle_SPAR_01_snd_F",
|
||||
"arifle_SPAR_01_GL_blk_F","arifle_SPAR_01_GL_khk_F","arifle_SPAR_01_GL_snd_F","arifle_SPAR_02_blk_F","arifle_SPAR_02_khk_F","arifle_SPAR_02_snd_F","arifle_SPAR_03_blk_F",
|
||||
"arifle_SPAR_03_khk_F","arifle_SPAR_03_snd_F","arifle_MX_khk_F","arifle_MX_GL_khk_F","arifle_MXC_khk_F","arifle_MXM_khk_F"
|
||||
],
|
||||
[//Magazines
|
||||
// Format is ["Magazine name, Minimum number to add, Maximum number to add],
|
||||
|
@ -25,6 +25,9 @@ Last modified 8/1/15
|
||||
GENERAL MISSION SYSTEM CONFIGURATION
|
||||
|
||||
***********************************************************/
|
||||
////////
|
||||
// Headless Client Configurations
|
||||
blck_useHC = false; // Not Yet Working
|
||||
|
||||
// MISSION MARKER CONFIGURATION
|
||||
// blck_labelMapMarkers: Determines if when the mission composition provides text labels, map markers with have a text label indicating the mission type
|
||||
@ -125,47 +128,25 @@ Last modified 8/1/15
|
||||
|
||||
blck_chanceBackpack = 0.3; // Chance AI will be spawned with a backpack
|
||||
blck_useNVG = true; // When true, AI will be spawned with NVG if is dark
|
||||
blck_removeNVG = false; // When true, NVG will be removed from AI when they are killed.
|
||||
blck_useLaunchers = false; // When true, some AI will be spawned with RPGs; they do not however fire on vehicles for some reason so I recommend this be set to false for now
|
||||
blck_launchersPerGroup = 1; // Defines the number of AI per group spawned with a launcher
|
||||
blck_launcherCleanup = true;// When true, launchers and launcher ammo are removed from dead AI.
|
||||
//blck_launcherTypes = ["launch_NLAW_F","launch_RPG32_F","launch_B_Titan_F","launch_I_Titan_F","launch_O_Titan_F","launch_B_Titan_short_F","launch_I_Titan_short_F","launch_O_Titan_short_F"];
|
||||
blck_launcherTypes = ["launch_RPG32_F"];
|
||||
blck_chanceAIBackpack = 0.33; // the chance that AI will be spawned with a backpack from the list below.
|
||||
blck_backpack = [
|
||||
"B_AssaultPack_blk",
|
||||
"B_AssaultPack_cbr",
|
||||
"B_AssaultPack_dgtl",
|
||||
"B_AssaultPack_khk",
|
||||
"B_AssaultPack_mcamo",
|
||||
"B_AssaultPack_rgr",
|
||||
"B_AssaultPack_sgg",
|
||||
"B_Bergen_blk",
|
||||
"B_Bergen_mcamo",
|
||||
"B_Bergen_rgr",
|
||||
"B_Bergen_sgg",
|
||||
"B_Carryall_cbr",
|
||||
"B_Carryall_khk",
|
||||
"B_Carryall_mcamo",
|
||||
"B_Carryall_ocamo",
|
||||
"B_Carryall_oli",
|
||||
"B_Carryall_oucamo",
|
||||
"B_FieldPack_blk",
|
||||
"B_FieldPack_cbr",
|
||||
"B_FieldPack_ocamo",
|
||||
"B_FieldPack_oucamo",
|
||||
"B_HuntingBackpack",
|
||||
"B_Kitbag_cbr",
|
||||
"B_Kitbag_mcamo",
|
||||
"B_Kitbag_sgg",
|
||||
"B_OutdoorPack_blk",
|
||||
"B_OutdoorPack_blu",
|
||||
"B_OutdoorPack_tan",
|
||||
"B_TacticalPack_blk",
|
||||
"B_TacticalPack_mcamo",
|
||||
"B_TacticalPack_ocamo",
|
||||
"B_TacticalPack_oli",
|
||||
"B_TacticalPack_rgr"
|
||||
];
|
||||
blck_launchersPerGroup = 1; // Defines the number of AI per group spawned with a launcher
|
||||
blck_launcherCleanup = true;// When true, launchers and launcher ammo are removed from dead AI.
|
||||
blck_baseBackpacks = [
|
||||
"B_AssaultPack_blk","B_AssaultPack_cbr","B_AssaultPack_dgtl","B_AssaultPack_khk","B_AssaultPack_mcamo","B_AssaultPack_rgr","B_AssaultPack_sgg",
|
||||
"B_Bergen_blk","B_Bergen_mcamo","B_Bergen_rgr","B_Bergen_sgg",
|
||||
"B_Carryall_cbr","B_Carryall_khk","B_Carryall_mcamo","B_Carryall_ocamo","B_Carryall_oli","B_Carryall_oucamo",
|
||||
"B_FieldPack_blk","B_FieldPack_cbr","B_FieldPack_ocamo","B_FieldPack_oucamo",
|
||||
"B_HuntingBackpack","B_Kitbag_cbr","B_Kitbag_mcamo","B_Kitbag_sgg",
|
||||
"B_OutdoorPack_blk","B_OutdoorPack_blu","B_OutdoorPack_tan","B_TacticalPack_blk",
|
||||
"B_TacticalPack_mcamo","B_TacticalPack_ocamo","B_TacticalPack_oli","B_TacticalPack_rgr"];
|
||||
blck_ApexBackpacks = ["B_Bergen_mcamo_F","B_Bergen_dgtl_F","B_Bergen_hex_F","B_Bergen_tna_F","B_AssaultPack_tna_F","B_Carryall_ghex_F",
|
||||
"B_FieldPack_ghex_F","B_ViperHarness_blk_F","B_ViperHarness_ghex_F","B_ViperHarness_hex_F","B_ViperHarness_khk_F",
|
||||
"B_ViperHarness_oli_F","B_ViperLightHarness_blk_F","B_ViperLightHarness_ghex_F","B_ViperLightHarness_hex_F","B_ViperLightHarness_khk_F","B_ViperLightHarness_oli_F"];
|
||||
blck_backpacks = blck_baseBackpacks + blck_ApexBackpacks;
|
||||
|
||||
//This defines how long after an AI dies that it's body disappears.
|
||||
blck_bodyCleanUpTimer = 1200; // time in seconds after which dead AI bodies are deleted
|
||||
@ -226,7 +207,13 @@ Last modified 8/1/15
|
||||
AI WEAPONS, UNIFORMS, VESTS AND GEAR
|
||||
|
||||
**********************************************************************************/
|
||||
blck_RifleSniper = [
|
||||
// Blacklisted itesm
|
||||
blck_blacklistedOptics = ["optic_Nightstalker","optic_tws","optic_tws_mg"];
|
||||
|
||||
// AI Weapons and Attachments
|
||||
blck_bipods = ["bipod_01_F_blk","bipod_01_F_mtp","bipod_01_F_snd","bipod_02_F_blk","bipod_02_F_hex","bipod_02_F_tan","bipod_03_F_blk","bipod_03_F_oli"];
|
||||
|
||||
blck_RifleSniper = [
|
||||
"srifle_EBR_F","srifle_GM6_F","srifle_LRR_F","srifle_DMR_01_F"
|
||||
];
|
||||
|
||||
@ -582,7 +569,11 @@ for examples of how you can do this see \Major\Compositions.sqf
|
||||
["srifle_DMR_06_camo_F","10Rnd_338_Mag"],
|
||||
["srifle_DMR_04_F","10Rnd_127x54_Mag"],
|
||||
["srifle_DMR_05_blk_F","10Rnd_93x64_DMR_05_Mag"],
|
||||
["srifle_DMR_06_olive_F","20Rnd_762x51_Mag"]
|
||||
["srifle_DMR_06_olive_F","20Rnd_762x51_Mag"],
|
||||
"arifle_AK12_F","arifle_AK12_GL_F","arifle_AKM_F","arifle_AKM_FL_F","arifle_AKS_F","arifle_ARX_blk_F","arifle_ARX_ghex_F","arifle_ARX_hex_F","arifle_CTAR_blk_F","arifle_CTAR_hex_F",
|
||||
"arifle_CTAR_ghex_F","arifle_CTAR_GL_blk_F","arifle_CTARS_blk_F","arifle_CTARS_hex_F","arifle_CTARS_ghex_F","arifle_SPAR_01_blk_F","arifle_SPAR_01_khk_F","arifle_SPAR_01_snd_F",
|
||||
"arifle_SPAR_01_GL_blk_F","arifle_SPAR_01_GL_khk_F","arifle_SPAR_01_GL_snd_F","arifle_SPAR_02_blk_F","arifle_SPAR_02_khk_F","arifle_SPAR_02_snd_F","arifle_SPAR_03_blk_F",
|
||||
"arifle_SPAR_03_khk_F","arifle_SPAR_03_snd_F","arifle_MX_khk_F","arifle_MX_GL_khk_F","arifle_MXC_khk_F","arifle_MXM_khk_F"
|
||||
],
|
||||
[//Magazines
|
||||
["3rnd_HE_Grenade_Shell",3,6],
|
||||
@ -642,20 +633,10 @@ for examples of how you can do this see \Major\Compositions.sqf
|
||||
// Format is ["Weapon Name","Magazine Name"],
|
||||
["arifle_Katiba_F","30Rnd_65x39_caseless_green"],
|
||||
["arifle_Katiba_GL_F","30Rnd_65x39_caseless_green"],
|
||||
["arifle_Mk20_F","30Rnd_556x45_Stanag"],
|
||||
["arifle_Mk20_plain_F","30Rnd_556x45_Stanag"],
|
||||
["arifle_Mk20C_F","30Rnd_556x45_Stanag"],
|
||||
["arifle_Mk20_GL_F","30Rnd_556x45_Stanag"],
|
||||
["arifle_Mk20_GL_plain_F","30Rnd_556x45_Stanag"],
|
||||
["arifle_MX_F","30Rnd_65x39_caseless_mag"],
|
||||
["arifle_MX_GL_F","30Rnd_65x39_caseless_mag"],
|
||||
["arifle_MXC_F","30Rnd_65x39_caseless_mag"],
|
||||
["arifle_MXM_F","30Rnd_65x39_caseless_mag"],
|
||||
["arifle_SDAR_F","20Rnd_556x45_UW_mag"],
|
||||
["arifle_TRG20_F","30Rnd_556x45_Stanag"],
|
||||
["SMG_02_F","30Rnd_9x21_Mag"],
|
||||
["SMG_01_F","30Rnd_45ACP_Mag_SMG_01"],
|
||||
["Hgun_PDW2000_F","30Rnd_9x21_Mag"],
|
||||
["arifle_MXM_F","30Rnd_65x39_caseless_mag_Tracer"],
|
||||
["arifle_MXM_Black_F","30Rnd_65x39_caseless_mag_Tracer"],
|
||||
["srifle_DMR_01_F","10Rnd_762x51_Mag"],
|
||||
@ -671,7 +652,11 @@ for examples of how you can do this see \Major\Compositions.sqf
|
||||
["srifle_DMR_03_F","10Rnd_338_Mag"],
|
||||
["srifle_DMR_04_Tan_F","10Rnd_338_Mag"],
|
||||
["srifle_DMR_05_hex_F","10Rnd_338_Mag"],
|
||||
["srifle_DMR_06_camo_F","10Rnd_338_Mag"]
|
||||
["srifle_DMR_06_camo_F","10Rnd_338_Mag"],
|
||||
"arifle_AK12_F","arifle_AK12_GL_F","arifle_AKM_F","arifle_AKM_FL_F","arifle_AKS_F","arifle_ARX_blk_F","arifle_ARX_ghex_F","arifle_ARX_hex_F","arifle_CTAR_blk_F","arifle_CTAR_hex_F",
|
||||
"arifle_CTAR_ghex_F","arifle_CTAR_GL_blk_F","arifle_CTARS_blk_F","arifle_CTARS_hex_F","arifle_CTARS_ghex_F","arifle_SPAR_01_blk_F","arifle_SPAR_01_khk_F","arifle_SPAR_01_snd_F",
|
||||
"arifle_SPAR_01_GL_blk_F","arifle_SPAR_01_GL_khk_F","arifle_SPAR_01_GL_snd_F","arifle_SPAR_02_blk_F","arifle_SPAR_02_khk_F","arifle_SPAR_02_snd_F","arifle_SPAR_03_blk_F",
|
||||
"arifle_SPAR_03_khk_F","arifle_SPAR_03_snd_F","arifle_MX_khk_F","arifle_MX_GL_khk_F","arifle_MXC_khk_F","arifle_MXM_khk_F"
|
||||
],
|
||||
[//Magazines
|
||||
// Format is ["Magazine name, Minimum number to add, Maximum number to add],
|
||||
|
@ -36,14 +36,13 @@ if (blck_debugON) then
|
||||
blck_enableBlueMissions = 1;
|
||||
blck_enableHunterMissions = 1;
|
||||
blck_enableScoutsMissions = 1;
|
||||
//blck_maxCrashSites = -3;
|
||||
blck_maxCrashSites = 3;
|
||||
|
||||
blck_enabeUnderwaterMissions = 1;
|
||||
blck_enabeUnderwaterMissions = -1;
|
||||
|
||||
|
||||
blck_cleanupCompositionTimer = 5; // Time after mission completion at which items in the composition are deleted.
|
||||
blck_cleanupCompositionTimer = 10; // Time after mission completion at which items in the composition are deleted.
|
||||
blck_AliveAICleanUpTime = 10; // Time after mission completion at which any remaining live AI are deleted.
|
||||
//blck_bodyCleanUpTimer = 20;
|
||||
blck_bodyCleanUpTimer = 20;
|
||||
|
||||
blck_SpawnEmplaced_Orange = 4; // Number of static weapons at Orange Missions
|
||||
blck_SpawnEmplaced_Green = 3; // Number of static weapons at Green Missions
|
||||
|
@ -4,6 +4,15 @@ Loosely based on the AI mission system by blckeagls ver 2.0.2
|
||||
Contributions by Narines: bug fixes, testing, 'fired' event handler
|
||||
Ideas or code from that by Vampire and KiloSwiss have been used for certain functions.
|
||||
|
||||
11/11/16 Version 6.42 build 10
|
||||
Redid the code that spawns the objects at missions to work properly with the new formats generated by M3Arma EDEN Editor whilc being backwards compatible with older formats used in the existing missions.
|
||||
Added code to add scopes and other attachments to AI weapons.
|
||||
Added new variable blck_blacklistedOptics which you can use to block spawning optics like TMS.
|
||||
Added new parameter blck_removeNVG which when true will cause NVG to be deleted from AI bodies.
|
||||
Fixed: launchers and rounds should now be deleted when blck_removeLaunchers = true;
|
||||
Fixed: All AI should spawn with a uniform.
|
||||
More bug fixes and correction of typos.
|
||||
|
||||
11/2/16 Version 6.41 Build 9
|
||||
Added a parameter blck_useKilledAIName that, when true, changes the kill messages to show player name and AI unit name
|
||||
Added message to players for killstreaks and a crypto/Tabs bonus for killstreaks.
|
||||
|
@ -1,15 +1,12 @@
|
||||
/*
|
||||
AI Mission for Epoch and Exile Mods to Arma 3
|
||||
Originally Compiled by blckeagls @ Zombieville.net
|
||||
Code was modified by Narines fixing several bugs.
|
||||
Modified by Ghostrider with thanks to ctbcrwker for input, testing, and troubleshooting.
|
||||
by Ghostrider-DbD-
|
||||
Credits to Vampire, Narines, KiloSwiss, blckeagls, theFUCHS, lazylink, Mark311 who wrote mission systems upon which this one is based and who's code is used with modification in some parts of this addon.
|
||||
|
||||
Thanks to cyncrwler for testing and bug fixes.
|
||||
*/
|
||||
private ["_version","_versionDate"];
|
||||
_blck_version = "6.4 Build 9";
|
||||
_blck_versionDate = "10-25-16 7:00 PM";
|
||||
_blck_version = "6.42 Build 10";
|
||||
_blck_versionDate = "11-11-16 11:00 AM";
|
||||
|
||||
private["_blck_loadingStartTime"];
|
||||
_blck_loadingStartTime = diag_tickTime;
|
||||
@ -25,11 +22,11 @@ call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\bl
|
||||
waitUntil {(isNil "blck_functionsCompiled") isEqualTo false;};
|
||||
waitUntil{blck_functionsCompiled};
|
||||
blck_functionsCompiled = nil;
|
||||
|
||||
call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\MapAddons\MapAddons_init.sqf";
|
||||
|
||||
private["_modType"];
|
||||
_modType = [] call blck_getModType;
|
||||
diag_log format["[blckeagls] Loading version %1 Build %2 for mod = %3",_blck_versionDate,_blck_version,_modType];
|
||||
// this will be a feature of an upcoming release
|
||||
//call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\MapAddons\MapAddons_init.sqf";
|
||||
|
||||
if (_modType isEqualTo "Epoch") then
|
||||
{
|
||||
@ -57,8 +54,7 @@ blck_worldSet = nil;
|
||||
// set up the lists of available missions for each mission category
|
||||
diag_log "[blckeagls] Loading Mission Lists";
|
||||
#include "\q\addons\custom_server\Missions\GMS_missionLists.sqf";
|
||||
|
||||
diag_log format["[blckeagls] version %1 Build %2 for mod = %3 Loaded in %4 seconds",_blck_versionDate,_blck_version,_modType,diag_tickTime - _blck_loadingStartTime]; //,blck_modType];
|
||||
diag_log format["[blckeagls] Loaded in %1 seconds",diag_tickTime - _blck_loadingStartTime];
|
||||
diag_log format["blckeagls] waiting for players to join ---- >>>>"];
|
||||
waitUntil{{isPlayer _x}count playableUnits > 0};
|
||||
diag_log "[blckeagls] Player Connected, loading mission system";
|
||||
|
Loading…
Reference in New Issue
Block a user