V46
This commit is contained in:
@ -1,3 +1,11 @@
|
||||
=================================================================================
|
||||
V46 (05-06-2016)
|
||||
=================================================================================
|
||||
Dynamic Traders are now working (placement of the base can be temperamental)
|
||||
If you want to design your own trader base, traders are automatically placed in front
|
||||
of the large trader signs. Look in the example trader1.sqf to see how it works. The
|
||||
example file was exported from Eden using M3Editor.
|
||||
|
||||
=================================================================================
|
||||
V45 (05-06-2016)
|
||||
=================================================================================
|
||||
@ -16,8 +24,6 @@ Added a process reporter module which logs server processes every 60 seconds to
|
||||
the rpt or dedicated log file if using infiSTAR logging (useful for diagnosing
|
||||
poor server performance)
|
||||
|
||||
|
||||
|
||||
=================================================================================
|
||||
V43 (26-05-2016)
|
||||
=================================================================================
|
||||
|
@ -4,7 +4,7 @@ class CfgPatches
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = 0.1;
|
||||
a3_exile_occupation_version = "v45 (05-06-2016)";
|
||||
a3_exile_occupation_version = "v46 (10-06-2016)";
|
||||
requiredAddons[] = {"a3_dms"};
|
||||
author[]= {"second_coming"};
|
||||
};
|
||||
|
51
config.sqf
51
config.sqf
@ -51,11 +51,12 @@ SC_occupyVehicle = true; // true if you want to have roaming AI vehicles
|
||||
SC_occupyVehicleIgnoreCount = true; // true if you want spawn vehicles regardless of overall AI count
|
||||
SC_occupyVehiclesLocked = false; // true if AI vehicles to stay locked until all the linked AI are dead
|
||||
|
||||
SC_occupyTraders = false; // (WORK IN PROGRESS, NOT WORKING YET) true if you want to create trader camps at positions specified in SC_occupyTraderDetails
|
||||
SC_occupyTraders = true; // (WORK IN PROGRESS, NOT WORKING YET) true if you want to create trader camps at positions specified in SC_occupyTraderDetails
|
||||
SC_occupyTraderDetails = [
|
||||
["Bubendorf Traders",[3896,14467,0],"trader1.sqf",true],
|
||||
["Schrattendamm Traders",[10584,4975,0],"trader1.sqf",true]
|
||||
]; //["Name",[x,y,z],"filename",true] trader name, location, safezone true/false
|
||||
["Tanoa","Lifou Traders",[7317,7217,0],"trader1.sqf",true],
|
||||
["Tanoa","Lijnhaven Traders",[11580,2051,0],"trader1.sqf",true],
|
||||
["Napf","Hafen Traders",[9286,17606,0],"trader1.sqf",true]
|
||||
]; //["mapname","Name",[x,y,z],"filename",true] trader name, location, safezone true/false
|
||||
|
||||
SC_SurvivorsChance = 20; // chance in % to spawn survivors instead of bandits (for places and land vehicles)
|
||||
SC_occupyPlacesSurvivors = true; // true if you want a chance to spawn survivor AI as well as bandits (SC_occupyPlaces must be true to use this option)
|
||||
@ -103,18 +104,18 @@ SC_occupySky = true; // true if you want to have roaming AI helis
|
||||
SC_occupySea = false; // true if you want to have roaming AI boats
|
||||
|
||||
SC_occupyTransport = true; // true if you want pubic transport (travels between traders)
|
||||
SC_occupyTransportClass = ["Exile_Chopper_Mohawk_FIA","Exile_Chopper_Mohawk_FIA","Exile_Car_LandRover_Urban"]; // to always use the same vehicle, specify one option only
|
||||
SC_occupyTransportClass = ["Exile_Chopper_Mohawk_FIA","Exile_Chopper_Mohawk_FIA",Exile_Car_LandRover_Urban]; // to always use the same vehicle, specify one option only
|
||||
SC_occupyTransportStartPos = []; // if empty defaults to map centre
|
||||
SC_occupyTransportAnnounce = false; // true if you want the pilot/driver to talk to passengers in vehicle chat, false if not
|
||||
SC_occupyTransportGetIn = ["Hello and welcome to Occupation Transport. We hope you enjoy the ride!"];
|
||||
SC_occupyTransportGetOut = ["Thanks for using Occupation Transport. We hope to see you again!"];
|
||||
SC_occupyTransportMessages = ["You guys should totally visit our website","No mooning out of the window please!","Scream if you want to go faster!","frrt"];
|
||||
SC_occupyTransportGetIn = [];
|
||||
SC_occupyTransportGetOut = [];
|
||||
SC_occupyTransportMessages = [];
|
||||
|
||||
|
||||
SC_occupyLootCrates = true; // true if you want to have random loot crates with guards
|
||||
SC_numberofLootCrates = 6; // if SC_occupyLootCrates = true spawn this many loot crates (overrided below for Namalsk)
|
||||
SC_LootCrateGuards = 7; // number of AI to spawn at each crate
|
||||
SC_LootCrateGuardsRandomize = true; // Use a random number of guards up to a maximum = SC_numberofGuards (so between 1 and SC_numberofGuards)
|
||||
SC_LootCrateGuardsRandomize = false; // Use a random number of guards up to a maximum = SC_LootCrateGuards (so between 1 and SC_LootCrateGuards)
|
||||
SC_occupyLootCratesMarkers = true; // true if you want to have markers on the loot crate spawns
|
||||
|
||||
SC_ropeAttach = false; // Allow lootcrates to be airlifted (for SC_occupyLootCrates and SC_occupyHeliCrashes)
|
||||
@ -146,10 +147,10 @@ SC_LootCrateItems = [
|
||||
];
|
||||
|
||||
SC_blackListedAreas = [
|
||||
[[3810,8887,0],500,"Chernarus"], // Vybor Occupation DMS Static Mission
|
||||
[[12571,14337,0],500,"Altis"], // Neochori Occupation DMS Static Mission
|
||||
[[3926,7523,0],500,"Namalsk"], // Norinsk Occupation DMS Static Mission
|
||||
[[3926,7523,0],500,"Napf"] // Lenzburg Occupation DMS Static Mission
|
||||
[[3810,8887,0], 500, "Chernarus"], // Vybor Occupation DMS Static Mission
|
||||
[[12571,14337,0], 500, "Altis"], // Neochori Occupation DMS Static Mission
|
||||
[[3926,7523,0], 500, "Namalsk"], // Norinsk Occupation DMS Static Mission
|
||||
[[3926,7523,0], 500, "Napf"] // Lenzburg Occupation DMS Static Mission
|
||||
];
|
||||
|
||||
|
||||
@ -285,20 +286,26 @@ if (worldName == 'Napf') then
|
||||
SC_occupyTraders = true;
|
||||
};
|
||||
|
||||
// Napf specific settings (if you want to override settings for specific maps if you run multiple servers)
|
||||
if (worldName == 'Tanoa') then
|
||||
{
|
||||
SC_occupyTraders = true;
|
||||
};
|
||||
|
||||
if (SC_debug) then
|
||||
{
|
||||
SC_extendedLogging = true;
|
||||
SC_processReporter = true;
|
||||
SC_mapMarkers = true;
|
||||
SC_occupyPlaces = true;
|
||||
SC_occupyVehicle = true;
|
||||
SC_occupyMilitary = true;
|
||||
SC_occupyStatic = true;
|
||||
SC_occupySky = true;
|
||||
SC_occupySea = true;
|
||||
SC_occupyTransport = true;
|
||||
SC_occupyLootCrates = true;
|
||||
SC_occupyHeliCrashes = true;
|
||||
//SC_occupyPlaces = true;
|
||||
//SC_occupyVehicle = true;
|
||||
//SC_occupyMilitary = true;
|
||||
//SC_occupyStatic = true;
|
||||
//SC_occupySky = true;
|
||||
//SC_occupySea = true;
|
||||
//SC_occupyTransport = true;
|
||||
//SC_occupyLootCrates = true;
|
||||
//SC_occupyHeliCrashes = true;
|
||||
SC_maxNumberofVehicles = 4;
|
||||
SC_maxNumberofBoats = 1;
|
||||
SC_maxNumberofHelis = 1;
|
||||
|
11
readme.txt
11
readme.txt
@ -1,11 +0,0 @@
|
||||
An AI spawner and monitor to be used in conjunction with DMS and will not work without it: http://www.exilemod.com/topic/61-dms-defents-mission-system/
|
||||
|
||||
Download the pbo version here: https://www.dropbox.com/s/dxy44l4mfu6ys53/a3_exile_occupation.pbo?dl=0
|
||||
|
||||
To install place the pbo into the @ExileServer/addons folder
|
||||
|
||||
For more info: http://www.exilemod.com/topic/12517-release-exile-occupation-roaming-ai
|
||||
|
||||
I do not give permission for anyone to sell or charge for the installation of any part of this set of scripts.
|
||||
|
||||
second_coming 2016
|
@ -1,11 +1,15 @@
|
||||
_roadSpawn = _this select 0;
|
||||
_waterSpawn = _this select 1;
|
||||
_inWater = 0;
|
||||
_position = [0,0,0];
|
||||
_nearestRoad = [0,0,0];
|
||||
private _roadSpawn = _this select 0;
|
||||
private _waterSpawn = _this select 1;
|
||||
private _inWater = 0;
|
||||
private _position = [0,0,0];
|
||||
private _nearestRoad = [0,0,0];
|
||||
|
||||
|
||||
private _middle = worldSize/2;
|
||||
private _pos = [_middle,_middle,0];
|
||||
private _maxDist = _middle - 100;
|
||||
|
||||
|
||||
_pos = if ((count _this)>2) then {_this select 2} else {false};
|
||||
_maxDist = if ((count _this)>2) then {_this select 3} else {false};
|
||||
|
||||
if(_waterSpawn) then
|
||||
{
|
||||
@ -16,13 +20,6 @@ else
|
||||
_inWater = 0;
|
||||
};
|
||||
|
||||
if(!_pos OR !_maxDist) then
|
||||
{
|
||||
_middle = worldSize/2;
|
||||
_pos = [_middle,_middle,0];
|
||||
_maxDist = _middle - 100;
|
||||
|
||||
};
|
||||
_validspot = false;
|
||||
|
||||
while{!_validspot} do
|
||||
@ -30,16 +27,14 @@ while{!_validspot} do
|
||||
sleep 0.2;
|
||||
_tempPosition = [_pos,0,_maxDist,15,_inWater,20,0] call BIS_fnc_findSafePos;
|
||||
_position = [_tempPosition select 0, _tempPosition select 1, 0];
|
||||
|
||||
//diag_log format["BIS_fnc_findSafePos found position %8 using %1,%2,%3,%4,%5,%6,%7",_pos,0,_maxDist,15,_inWater,20,0,_position];
|
||||
_validspot = true;
|
||||
_validspot = true;
|
||||
|
||||
if(_roadSpawn) then
|
||||
{
|
||||
|
||||
// Get position of nearest roads
|
||||
_nearRoads = _position nearRoads 500;
|
||||
if (count _nearRoads == 0 OR isNil "_nearRoads") then
|
||||
if (isNil "_nearRoads" OR count _nearRoads == 0) then
|
||||
{
|
||||
_validspot = false;
|
||||
diag_log format["BIS_fnc_findSafePos no roads found near position %1",_position];
|
||||
@ -62,8 +57,11 @@ while{!_validspot} do
|
||||
|
||||
if(_validspot) then
|
||||
{
|
||||
_validspot = [ _position ] call SC_fnc_isSafePos;
|
||||
};
|
||||
_validspot = [ _position ] call SC_fnc_isSafePos;
|
||||
};
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
_position
|
@ -1,11 +1,11 @@
|
||||
_position = _this select 0;
|
||||
_validspot = true;
|
||||
private _position = _this select 0;
|
||||
private _validspot = true;
|
||||
|
||||
// Check if position is near a blacklisted area
|
||||
{
|
||||
_blacklistPos = _x select 0;
|
||||
_blacklistRadius = _x select 1;
|
||||
_blacklistMap = _x select 2;
|
||||
private _blacklistPos = _x select 0;
|
||||
private _blacklistRadius = _x select 1;
|
||||
private _blacklistMap = _x select 2;
|
||||
if(isNil "_blacklistPos" OR isNil "_blacklistRadius" OR isNil "_blacklistMap") exitWith
|
||||
{
|
||||
_logDetail = format["[OCCUPATION]:: Invalid blacklist position supplied check SC_blackListedAreas in your config.sqf"];
|
||||
@ -22,33 +22,19 @@ _validspot = true;
|
||||
}forEach SC_blackListedAreas;
|
||||
|
||||
//Check if near player territory
|
||||
_nearBase = (nearestObjects [_position,["Exile_Construction_Flag_Static"],SC_minDistanceToTerritory]) select 0;
|
||||
private _nearBase = (nearestObjects [_position,["Exile_Construction_Flag_Static"],SC_minDistanceToTerritory]) select 0;
|
||||
if (!isNil "_nearBase") then { _validspot = false; };
|
||||
|
||||
// Don't spawn AI near traders and spawn zones
|
||||
{
|
||||
switch (getMarkerType _x) do
|
||||
{
|
||||
case "ExileSpawnZone":
|
||||
{
|
||||
if(_position distance (getMarkerPos _x) < SC_minDistanceToSpawnZones) exitWith
|
||||
{
|
||||
_validspot = false;
|
||||
};
|
||||
};
|
||||
case "ExileTraderZone":
|
||||
{
|
||||
if(_position distance (getMarkerPos _x) < SC_minDistanceToTraders) exitWith
|
||||
{
|
||||
_validspot = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
forEach allMapMarkers;
|
||||
// is position in range of a territory?
|
||||
if([_position, SC_minDistanceToTerritory] call ExileClient_util_world_isTerritoryInRange) exitwith { _validspot = false; };
|
||||
|
||||
// Don't spawn additional AI if there are players in range
|
||||
// is position in range of a trader zone?
|
||||
if([_position, SC_minDistanceToTraders] call ExileClient_util_world_isTraderZoneInRange) exitwith { _validspot = false; };
|
||||
|
||||
// is position in range of a spawn zone?
|
||||
if([_position, SC_minDistanceToSpawnZones] call ExileClient_util_world_isSpawnZoneInRange) exitwith { _validspot = false; };
|
||||
|
||||
// is position in range of a player?
|
||||
if([_position, SC_minDistanceToPlayer] call ExileClient_util_world_isAlivePlayerInRange) exitwith { _validspot = false; };
|
||||
|
||||
|
||||
_validspot
|
@ -5,8 +5,7 @@ _logDetail = format ["[OCCUPATION:LootCrates]:: Starting Occupation Loot Crates"
|
||||
|
||||
_logDetail = format["[OCCUPATION:LootCrates]:: worldname: %1 crates to spawn: %2",worldName,SC_numberofLootCrates];
|
||||
[_logDetail] call SC_fnc_log;
|
||||
|
||||
private['_position'];
|
||||
private _position = [0,0,0];
|
||||
|
||||
for "_i" from 1 to SC_numberofLootCrates do
|
||||
{
|
||||
@ -19,8 +18,7 @@ for "_i" from 1 to SC_numberofLootCrates do
|
||||
|
||||
//Check if near another crate site
|
||||
_nearOtherCrate = (nearestObjects [_position,["CargoNet_01_box_F"],500]) select 0;
|
||||
if (!isNil "_nearOtherCrate") then { _validspot = false; };
|
||||
|
||||
if (!isNil "_nearOtherCrate") then { _validspot = false; };
|
||||
};
|
||||
|
||||
_mapMarkerName = format ["loot_marker_%1", _i];
|
||||
|
@ -1,108 +1,107 @@
|
||||
_logDetail = format['[OCCUPATION:Traders] starting @ %1',time];
|
||||
[_logDetail] call SC_fnc_log;
|
||||
{
|
||||
_traderName = _x select 0;
|
||||
_traderPos = _x select 1;
|
||||
_fileName = _x select 2;
|
||||
_createSafezone = _x select 3;
|
||||
_filePath = format ["x\addons\a3_exile_occupation\trader\%1",_fileName];
|
||||
_traderBaseFile = call compile preprocessFileLineNumbers _filePath;
|
||||
|
||||
_traderObjects = _traderBaseFile apply
|
||||
private _world = _x select 0;
|
||||
|
||||
if (worldName == _world) then
|
||||
{
|
||||
private ["_obj","_pos"];
|
||||
_obj = createVehicle [_x select 0, [0,0,0], [], 0, "CAN_COLLIDE"];
|
||||
_pos = _x select 1;
|
||||
_pos set [2,(_pos select 2)+5000];
|
||||
if (_x select 4) then
|
||||
private _traderName = _x select 1;
|
||||
private _traderPos = _x select 2;
|
||||
private _fileName = _x select 3;
|
||||
private _createSafezone = _x select 4;
|
||||
private _file = format ["x\addons\a3_exile_occupation\trader\%1",_fileName];
|
||||
SC_fnc_createTraders = compile preprocessFileLineNumbers _file;
|
||||
[_traderPos] call SC_fnc_createTraders;
|
||||
|
||||
_traderName setmarkeralpha 0;
|
||||
private _marker = createMarker [ format [" %1 ", _traderName], _traderPos];
|
||||
_marker setMarkerText format ["%1", _traderName];
|
||||
_marker setMarkerSize [3,3];
|
||||
_marker setMarkerShape "ICON";
|
||||
_marker setMarkerType "loc_Tree";
|
||||
_marker setMarkerColor "ColorBlack";
|
||||
_marker setMarkerBrush "Vertical";
|
||||
|
||||
if(_createSafezone) then
|
||||
{
|
||||
_obj setDir (_x select 2);
|
||||
_obj setPosATL _pos;
|
||||
}
|
||||
else
|
||||
{
|
||||
_obj setPosATL _pos;
|
||||
_obj setVectorDirAndUp (_x select 3);
|
||||
ExileTraderZoneMarkerPositions pushBack _traderPos;
|
||||
ExileTraderZoneMarkerPositionsAndSize pushBack [_traderPos, 175];
|
||||
publicVariable "ExileTraderZoneMarkerPositions";
|
||||
publicVariable "ExileTraderZoneMarkerPositionsAndSize";
|
||||
};
|
||||
_obj;
|
||||
};
|
||||
|
||||
[_traderObjects,_traderPos] call DMS_fnc_setRelPositions;
|
||||
|
||||
{
|
||||
_obj = _x;
|
||||
_pos = getPos _obj;
|
||||
_obj setPos _pos;
|
||||
_obj enableSimulation false;
|
||||
}forEach _traderObjects;
|
||||
|
||||
_traderName setmarkeralpha 0;
|
||||
_marker = createMarker [ format [" %1 ", _traderName], _traderPos];
|
||||
_marker setMarkerText format ["%1", _traderName];
|
||||
_marker setMarkerSize [3,3];
|
||||
_marker setMarkerShape "ICON";
|
||||
_marker setMarkerType "loc_Tree";
|
||||
_marker setMarkerColor "ColorBlack";
|
||||
_marker setMarkerBrush "Vertical";
|
||||
|
||||
if(_createSafezone) then
|
||||
{
|
||||
ExileTraderZoneMarkerPositions pushBack _traderPos;
|
||||
ExileTraderZoneMarkerPositionsAndSize pushBack [_traderPos, 175];
|
||||
publicVariable "ExileTraderZoneMarkerPositions";
|
||||
publicVariable "ExileTraderZoneMarkerPositionsAndSize";
|
||||
};
|
||||
_logDetail = format['[OCCUPATION:Traders] Created trader base %1 @ %2',_traderName,_traderPos];
|
||||
[_logDetail] call SC_fnc_log;
|
||||
|
||||
_group = createGroup resistance;
|
||||
_group setCombatMode "BLUE";
|
||||
|
||||
|
||||
// Weapon Trader
|
||||
_traderPosition = _traderPos findEmptyPosition [0,25];
|
||||
"Exile_Trader_CommunityCustoms" createUnit [_traderPosition, _group, "trader = this;"];
|
||||
trader setVariable ["ExileTraderType", "Exile_Trader_CommunityCustoms",true];
|
||||
|
||||
_traderDir = trader getDir _traderPos;
|
||||
trader setDir _traderDir;
|
||||
[trader,"HubStandingUA_idle2"] call BIS_fnc_ambientAnim;
|
||||
|
||||
// Equipment Trader
|
||||
_traderPosition = _traderPos findEmptyPosition [0,25];
|
||||
"Exile_Trader_CommunityCustoms" createUnit [_traderPosition, _group, "trader = this;"];
|
||||
trader setVariable ["ExileTraderType", "Exile_Trader_CommunityCustoms",true];
|
||||
|
||||
_traderDir = trader getDir _traderPos;
|
||||
trader setDir _traderDir;
|
||||
[trader,"HubStanding_idle1"] call BIS_fnc_ambientAnim;
|
||||
|
||||
_logDetail = format['[OCCUPATION:Traders] Created trader base %1 @ %2',_traderName,_traderPos];
|
||||
[_logDetail] call SC_fnc_log;
|
||||
|
||||
{
|
||||
_unit = _x;
|
||||
_unitName = ["bandit"] call SC_fnc_selectName;
|
||||
if(!isNil "_unitName") then { _unit setName _unitName; };
|
||||
_unit allowDamage false;
|
||||
_unit disableAI 'AUTOTARGET';
|
||||
_unit disableAI 'TARGET';
|
||||
_unit disableAI 'SUPPRESSION';
|
||||
_unit disableAI "MOVE";
|
||||
removeGoggles _unit;
|
||||
|
||||
|
||||
_uniform = SC_BanditUniforms call BIS_fnc_selectRandom;
|
||||
_vest = SC_BanditVests call BIS_fnc_selectRandom;
|
||||
_headgear = SC_BanditHeadgear call BIS_fnc_selectRandom;
|
||||
_weapon = SC_BanditWeapon call BIS_fnc_selectRandom;
|
||||
_backpack = SC_BanditBackpack call BIS_fnc_selectRandom;
|
||||
|
||||
_unit forceAddUniform _uniform;
|
||||
_unit addWeapon _weapon";
|
||||
_unit addVest _vest;
|
||||
_unit addBackpack _backpack;
|
||||
_unit addHeadgear _headgear;
|
||||
_unit setCaptive true;
|
||||
|
||||
}foreach units _group;
|
||||
|
||||
// Place the traders randomly
|
||||
|
||||
private _traders = [
|
||||
["Exile_Trader_AircraftCustoms", "Exile_Sign_AircraftCustoms", "GreekHead_A3_08", "HubStandingUC_idle1"],
|
||||
["Exile_Trader_Aircraft", "Exile_Sign_Aircraft", "WhiteHead_10", "HubStandingUC_idle2"],
|
||||
["Exile_Trader_Armory", "Exile_Sign_Armory", "WhiteHead_01", "HubStandingUC_idle3"],
|
||||
["Exile_Trader_Hardware", "Exile_Sign_Hardware", "WhiteHead_14", "HubStandingUC_idle1"],
|
||||
["Exile_Trader_Vehicle", "Exile_Sign_Vehicles", "AfricanHead_03", "HubStandingUC_idle2"],
|
||||
["Exile_Trader_VehicleCustoms", "Exile_Sign_VehicleCustoms", "GreekHead_A3_05", "HubStandingUC_idle3"],
|
||||
["Exile_Trader_WasteDump", "Exile_Sign_WasteDump", "WhiteHead_07", "HubStandingUC_idle2"],
|
||||
["Exile_Trader_Food", "Exile_Sign_Food", "WhiteHead_15", "HubStandingUC_idle3"],
|
||||
["Exile_Trader_SpecialOperations", "Exile_Sign_SpecialOperations", "WhiteHead_06", "HubStandingUC_idle1"],
|
||||
["Exile_Trader_Equipment", "Exile_Sign_Equipment", "WhiteHead_15", "HubStandingUC_idle2"],
|
||||
["Exile_Trader_Office", "Exile_Sign_Office", "WhiteHead_10", "HubStandingUC_idle1"]
|
||||
];
|
||||
private _group = createGroup SC_SurvivorSide;
|
||||
_group setCombatMode "BLUE";
|
||||
_group setVariable ["DMS_AllowFreezing",false,true];
|
||||
_group setVariable ["DMS_LockLocality",true];
|
||||
_group setVariable ["DMS_SpawnedGroup",false];
|
||||
_group setVariable ["DMS_Group_Side", "survivor"];
|
||||
|
||||
|
||||
enableSentences false;
|
||||
enableRadio false;
|
||||
{
|
||||
private _traderType = _x select 0;
|
||||
private _traderSign = _x select 1;
|
||||
private _traderFace = _x select 2;
|
||||
private _traderAnimation = _x select 3;
|
||||
|
||||
|
||||
// Find nearest relevant sign for the trader
|
||||
private _nearestSign = nearestObject [_traderPos, _traderSign];
|
||||
private _signDir = getDir _nearestSign;
|
||||
_nearestSign setDir _signDir;
|
||||
private _traderPosition = position _nearestSign;
|
||||
|
||||
_traderType createUnit [_traderPosition, _group, "trader = this;"];
|
||||
trader disableAI "FSM";
|
||||
trader disableAI "MOVE";
|
||||
trader disableAI "TARGET";
|
||||
trader disableAI "AUTOTARGET";
|
||||
trader disableAI "AUTOCOMBAT";
|
||||
trader disableAI "COVER";
|
||||
trader disableAI "SUPPRESSION";
|
||||
trader reveal _nearestSign;
|
||||
_nearestSign disableCollisionWith trader;
|
||||
trader disableCollisionWith _nearestSign;
|
||||
trader attachTo [_nearestSign, [0, -2, -0.6]];
|
||||
detach trader;
|
||||
private _traderDirection = _signDir-180;
|
||||
trader setDir _traderDirection;
|
||||
|
||||
trader setVariable ["ExileTraderType", _traderType,true];
|
||||
trader allowDamage false;
|
||||
removeGoggles trader;
|
||||
removeBackpack trader;
|
||||
removeVest trader;
|
||||
removeHeadgear trader;
|
||||
private _loadOut = ["bandit"] call SC_fnc_selectGear;
|
||||
trader forceAddUniform (_loadOut select 8);
|
||||
trader addVest (_loadOut select 9);
|
||||
trader addBackpack (_loadOut select 10);
|
||||
trader addHeadgear "H_Cap_blk";
|
||||
//trader setCaptive true;
|
||||
//trader switchMove _traderAnimation;
|
||||
sleep 0.2;
|
||||
diag_log format["[OCCUPATION:Traders] Created %1 with head %2 at %3 facing %4", _x select 0, _x select 2, _traderPosition, _traderDirection];
|
||||
} forEach _traders;
|
||||
};
|
||||
} foreach SC_occupyTraderDetails;
|
@ -220,14 +220,6 @@ while {true} do
|
||||
_transportDriver enableAI "MOVE";
|
||||
};
|
||||
if(!Alive _transportDriver) exitWith {};
|
||||
_transportDriverlastSpoke = _transportDriver getVariable "SC_lastSpoke";
|
||||
if(time - _transportDriverlastSpoke > 30) then
|
||||
{
|
||||
_randomChat = [SC_occupyTransportMessages] call BIS_fnc_selectRandom;
|
||||
_speech = _randomChat select 0;
|
||||
_transportDriver vehiclechat _speech;
|
||||
_transportDriver setVariable ["SC_lastSpoke", time, true];
|
||||
};
|
||||
uiSleep 5;
|
||||
};
|
||||
deleteMarker _mk;
|
||||
|
@ -251,6 +251,9 @@ if(_vehiclesToSpawn >= 1) then
|
||||
_unitName = [_side] call SC_fnc_selectName;
|
||||
if(!isNil "_unitName") then { _unit setName _unitName; };
|
||||
}forEach units _group;
|
||||
|
||||
[units _group] orderGetIn true;
|
||||
sleep 10;
|
||||
|
||||
[_group, _spawnLocation, 2000] call bis_fnc_taskPatrol;
|
||||
_group setBehaviour "SAFE";
|
||||
|
@ -1,5 +1,10 @@
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
if(SC_occupyTraders) then
|
||||
{
|
||||
call compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\occupationTraders.sqf";
|
||||
};
|
||||
|
||||
if(SC_processReporter) then
|
||||
{
|
||||
_logDetail = format ["[processReporter]:: Initialised at %1",time];
|
||||
@ -38,13 +43,6 @@ if(SC_occupyRandomSpawn) then
|
||||
call compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\occupationRandomSpawn.sqf";
|
||||
};
|
||||
|
||||
|
||||
if(SC_occupyTraders) then
|
||||
{
|
||||
uiSleep 15; // delay the start
|
||||
call compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\occupationTraders.sqf";
|
||||
};
|
||||
|
||||
if(SC_occupyLootCrates) then
|
||||
{
|
||||
uiSleep 15; // delay the start
|
||||
@ -101,6 +99,7 @@ if(SC_occupyMilitary) then
|
||||
|
||||
if(SC_occupyTransport) then
|
||||
{
|
||||
uiSleep 15; // delay the start
|
||||
[] execVM "\x\addons\a3_exile_occupation\scripts\occupationTransport.sqf";
|
||||
};
|
||||
|
||||
|
@ -1,63 +1,103 @@
|
||||
private ["_obj"];
|
||||
private _traderPosition = _this select 0;
|
||||
|
||||
_obj = [
|
||||
["Flag_Green_F",[6784.61,2234.17,0],0,[[0,1,0],[0,0,1]],true],
|
||||
["Land_LampHalogen_F",[6781.62,2236.18,4.76837e-007],0,[[0,1,0],[0,0,1]],true],
|
||||
["Land_BagBunker_Tower_F",[6785.5,2236.32,0],0,[[0,1,0],[0,0,1]],true],
|
||||
["Land_HBarrierWall_corridor_F",[6792.26,2215.3,0],90.8969,[[0.999877,-0.0156535,0],[0,-0,1]],true],
|
||||
["Land_HBarrierWall_corner_F",[6787.26,2218.83,0],180,[[-8.74228e-008,-1,0],[-0,0,1]],true],
|
||||
["Land_HBarrierWall4_F",[6802.85,2219.04,0],181.56,[[-0.0272239,-0.999629,0],[-0,0,1]],true],
|
||||
["Land_HBarrierWall4_F",[6808.37,2219.03,0],181.56,[[-0.0272239,-0.999629,0],[-0,0,1]],true],
|
||||
["Land_HBarrierWall4_F",[6786.7,2223.28,0],271.56,[[-0.999629,0.027224,0],[0,0,1]],true],
|
||||
["Land_HBarrierWall4_F",[6797.38,2219.01,0],181.56,[[-0.0272239,-0.999629,0],[-0,0,1]],true],
|
||||
["Land_HBarrierWall4_F",[6786.6,2228.88,0],271.56,[[-0.999629,0.027224,0],[0,0,1]],true],
|
||||
["Land_HBarrierWall4_F",[6813.69,2219.18,0],181.56,[[-0.0272239,-0.999629,0],[-0,0,1]],true],
|
||||
["Land_BagBunker_Small_F",[6797.94,2212.17,0],0,[[0,1,0],[0,0,1]],true],
|
||||
["WaterPump_01_forest_F",[6812.35,2222.43,0.0008564],0.00101824,[[1.75769e-005,1,0],[0,0,1]],true],
|
||||
["Land_Pipes_large_F",[6802.52,2223.54,0],180,[0,0,1],true],
|
||||
["Land_Pipes_large_F",[6802.98,2225.14,0],180,[0,0,1],true],
|
||||
["Land_Pipes_large_F",[6802.32,2221.82,0],180,[0,0,1],true],
|
||||
["Land_WaterTank_F",[6809.06,2221.62,-4.76837e-006],359.999,[0,0,1],true],
|
||||
["Land_Pallets_F",[6784.61,2234.17,0],0,[[0,1,0],[0,0,1]],true],
|
||||
["Land_Sign_WarningMilitaryArea_F",[6787.54,2212.37,0],8.19623e-005,[[1.5979e-006,1,0],[0,0,1]],true],
|
||||
["Land_BagFence_Round_F",[6786.37,2238.76,2.78],220,[[-0.642788,-0.766044,0],[-0,0,1]],true],
|
||||
["Land_BagFence_Round_F",[6784.2,2238.49,2.78],125,[[0.819152,-0.573576,0],[0,-0,1]],true],
|
||||
["Land_Pallet_F",[6784.56,2235.6,0.0981288],3.03364,[[0.0529221,0.998599,0],[0,0,1]],true],
|
||||
["Land_Pallet_F",[6784.55,2236.99,0.0814247],356.286,[[-0.0647757,0.9979,0],[0,0,1]],true],
|
||||
["Land_Pallet_F",[6784.54,2238.55,-4.76837e-007],360,[[1.74846e-007,1,0],[0,0,1]],true],
|
||||
["Land_PaperBox_closed_F",[6794.19,2226.73,0],320,[[-0.642787,0.766045,0],[0,0,1]],true],
|
||||
["Land_PaperBox_closed_F",[6791.38,2226.37,0],255,[[-0.965926,-0.258819,0],[-0,0,1]],true],
|
||||
["Land_PaperBox_closed_F",[6793.82,2224.24,0],280,[[-0.984808,0.173649,0],[0,0,1]],true],
|
||||
["Land_PaperBox_closed_F",[6791.46,2224.07,0],90,[[1,-4.37114e-008,0],[0,-0,1]],true],
|
||||
["Land_LampHalogen_F",[6802.4,2215.7,4.76837e-007],270,[[-1,4.88762e-007,0],[0,0,1]],true],
|
||||
["Land_HBarrierTower_F",[6787.46,2256.03,0],140,[[0.642787,-0.766045,0],[0,-0,1]],true],
|
||||
["Land_HBarrierWall6_F",[6786.93,2244.97,0],270,[[-1,4.88762e-007,0],[0,0,1]],true],
|
||||
["Land_HBarrierWall6_F",[6794.56,2256.56,0],3.15003,[[0.0549506,0.998489,0],[0,0,1]],true],
|
||||
["Land_HBarrierWall_corridor_F",[6811.83,2260.33,0],90.8969,[[0.999877,-0.0156535,0],[0,-0,1]],true],
|
||||
["Land_HBarrierWall4_F",[6806.85,2256.56,0],1.56032,[[0.0272296,0.999629,0],[0,0,1]],true],
|
||||
["Land_HBarrierWall4_F",[6786.79,2250.58,0],271.56,[[-0.999629,0.027224,0],[0,0,1]],true],
|
||||
["Land_HBarrierWall4_F",[6801.41,2256.53,0],1.56,[[0.0272237,0.999629,0],[0,0,1]],true],
|
||||
["Land_BagBunker_Small_F",[6805.37,2261.99,0],180,[[-8.74228e-008,-1,0],[-0,0,1]],true],
|
||||
["Land_FieldToilet_F",[6806.4,2242.7,4.24385e-005],270,[[-1,4.88762e-007,0],[0,0,1]],true],
|
||||
["Land_Pallet_MilBoxes_F",[6811.32,2247.61,0],0,[[0,1,0],[0,0,1]],true],
|
||||
["Land_PaperBox_open_full_F",[6806.73,2251.91,0],0,[[0,1,0],[0,0,1]],true],
|
||||
["Land_PaperBox_open_full_F",[6809.12,2247.42,0],0,[[0,1,0],[0,0,1]],true],
|
||||
["Land_PaperBox_open_empty_F",[6809.19,2251.86,0],0,[[0,1,0],[0,0,1]],true],
|
||||
["Land_PaperBox_closed_F",[6809.15,2249.86,0],0,[[0,1,0],[0,0,1]],true],
|
||||
["Land_PaperBox_closed_F",[6806.56,2247.15,0],255,[[-0.965926,-0.258819,0],[-0,0,1]],true],
|
||||
["Land_PaperBox_closed_F",[6806.51,2249.71,0],0,[[0,1,0],[0,0,1]],true],
|
||||
["Land_Pallets_stack_F",[6808.97,2245.2,-4.76837e-007],360,[[1.74846e-007,1,0],[0,0,1]],true],
|
||||
["Land_Pallet_vertical_F",[6808.94,2246.27,0.000220776],0.000954998,[[1.65116e-005,1,0],[0,0,1]],true],
|
||||
["Land_LampHalogen_F",[6800.11,2260.46,4.76837e-007],90,[[1,-4.37114e-008,0],[0,-0,1]],true],
|
||||
["Land_BagBunker_Large_F",[6821.33,2237.75,0],270,[[-1,4.88762e-007,0],[0,0,1]],true],
|
||||
["Land_HBarrierTower_F",[6817.26,2219.4,0],315,[[-0.707107,0.707107,0],[0,0,1]],true],
|
||||
["Land_HBarrierWall4_F",[6817,2224.9,0],91.5603,[[0.999629,-0.0272291,0],[0,-0,1]],true],
|
||||
["Land_HBarrierWall4_F",[6816.92,2230.47,0],91.5603,[[0.999629,-0.0272291,0],[0,-0,1]],true],
|
||||
["Land_LampHalogen_F",[6819.85,2232.55,4.76837e-007],180,[[-8.74228e-008,-1,0],[-0,0,1]],true],
|
||||
["Land_HBarrierWall_corner_F",[6816.66,2256.74,0],0,[[0,1,0],[0,0,1]],true],
|
||||
["Land_HBarrierWall4_F",[6817.16,2252.26,0],91.5603,[[0.999629,-0.0272291,0],[0,-0,1]],true],
|
||||
["Land_Sign_WarningMilitaryArea_F",[6816.03,2262.96,0],180,[[-8.74228e-008,-1,0],[-0,0,1]],true],
|
||||
["Land_HBarrierWall6_F",[6817.3,2246.33,0],90,[[1,-4.37114e-008,0],[0,-0,1]],true]
|
||||
private _objects = [
|
||||
["Land_ToiletBox_F",[7.94287,-11.9932,0],269.387,[false,false]],
|
||||
["Land_Cargo_Patrol_V3_F",[-11.478,14.2637,0],314.038,[false,false]],
|
||||
["Land_HBarrier_5_F",[1.7666,-12.8599,0],180.593,[false,false]],
|
||||
["Land_HBarrier_5_F",[6.42578,-14.8511,0],230.768,[false,false]],
|
||||
["Land_HBarrier_5_F",[-15.542,-12.896,0],231.635,[false,false]],
|
||||
["Land_HBarrier_5_F",[-18.415,-2.6499,0],240.934,[false,false]],
|
||||
["Land_HBarrier_5_F",[-18.5845,2.50732,0],109.927,[false,false]],
|
||||
["Land_HBarrier_5_F",[-10.5596,20.0483,0],1.98476,[false,false]],
|
||||
["Land_HBarrier_5_F",[13.9531,16.1758,0],21.7147,[false,false]],
|
||||
["Land_HBarrier_5_F",[19.2212,15.5854,0],354.618,[false,false]],
|
||||
["Land_HBarrier_5_F",[-17.2637,13.5308,0],93.7194,[false,false]],
|
||||
["Land_HBarrier_5_F",[-17.4771,7.89014,0],91.2719,[false,false]],
|
||||
["Land_HBarrier_5_F",[-15.1694,18.2041,0],133.912,[false,false]],
|
||||
["Land_HBarrier_5_F",[-5.84326,18.0454,0],43.2557,[false,false]],
|
||||
["Land_HBarrier_5_F",[22.5625,1.1167,0],88.7307,[false,false]],
|
||||
["Land_HBarrier_5_F",[24.1938,-3.44141,0],50.8217,[false,false]],
|
||||
["Land_HBarrier_5_F",[26.0176,-8.41504,0],88.1428,[false,false]],
|
||||
["Land_HBarrier_5_F",[25.3989,-13.9629,0],108.365,[false,false]],
|
||||
["Land_HBarrier_5_F",[9.27393,15.4619,0],324.922,[false,false]],
|
||||
["Land_HBarrier_5_F",[-0.294922,-9.28955,0],271.403,[false,false]],
|
||||
["Land_HBarrier_5_F",[-1.34229,-4.09619,0],242.879,[false,false]],
|
||||
["Land_HBarrier_5_F",[10.7861,-17.0801,0],177.693,[false,false]],
|
||||
["Land_HBarrier_5_F",[16.2275,-16.793,0],177.693,[false,false]],
|
||||
["Land_HBarrier_5_F",[21.8232,-16.5684,0],177.693,[false,false]],
|
||||
["Land_HBarrier_5_F",[23.7451,13.627,0],48.1373,[false,false]],
|
||||
["Land_HBarrier_5_F",[30.6641,-0.37793,0],231.211,[false,false]],
|
||||
["Land_HBarrier_5_F",[29.1577,4.16553,0],271.273,[false,false]],
|
||||
["Land_HBarrier_5_F",[29.2173,9.62793,0],270.843,[false,false]],
|
||||
["Land_HBarrier_5_F",[-1.12988,15.0679,0],23.8596,[false,false]],
|
||||
["Land_HBarrier_5_F",[4.00098,14.042,0],179.263,[false,false]],
|
||||
["Land_HBarrier_5_F",[-2.38965,0.879395,0],273.522,[false,false]],
|
||||
["Land_PortableLight_double_F",[-14.084,16.8789,0],311.55,[false,false]],
|
||||
["Land_Pallets_stack_F",[-11.4922,-14.6489,0],107.837,[false,false]],
|
||||
["Land_WaterTank_F",[1.14648,3.10059,0],139.599,[false,false]],
|
||||
["Land_HBarrier_5_F",[-17.1592,-7.78418,0],270.637,[false,false]],
|
||||
["Land_PaperBox_closed_F",[-8.60693,9.21143,0],20.4457,[false,false]],
|
||||
["Land_ToiletBox_F",[7.92529,-10.52,0],265.835,[false,false]],
|
||||
["Land_HBarrier_5_F",[20.46,5.09814,0.00541687],36.5701,[false,false]],
|
||||
["Land_HBarrier_5_F",[0.0288086,5.08154,-0.00163269],329.047,[false,false]],
|
||||
["Land_HBarrier_5_F",[5.16797,6.6377,0],357.498,[false,false]],
|
||||
["Land_HBarrier_5_F",[29.4736,-8.73291,0],177.704,[false,false]],
|
||||
["Land_PaperBox_open_empty_F",[-6.71045,10.3428,0],166.944,[false,false]],
|
||||
["Land_HBarrier_3_F",[26.8101,11.7979,0],180.593,[false,false]],
|
||||
["Land_GarbageBags_F",[18.8657,-20.061,0],158.176,[false,false]],
|
||||
["Land_BarrelSand_grey_F",[2.88428,4.87354,0],200.404,[false,false]],
|
||||
["Land_BarrelEmpty_F",[2.84131,4.04346,0],143.945,[false,false]],
|
||||
["Land_HBarrier_5_F",[-12.1118,-17.1772,0],231.635,[false,false]],
|
||||
["Land_HBarrier_5_F",[-2.86719,-14.9609,0],143.23,[false,false]],
|
||||
["Exile_Sign_Aircraft",[-19.5864,-8.28271,0],268.147+180,[false,false]],
|
||||
["Exile_Sign_AircraftCustoms",[-20.5908,-3.13135,0],238.791+180,[false,false]],
|
||||
["Land_Wreck_UAZ_F",[13.4033,-20.8965,0],0,[false,false]],
|
||||
["Land_Wreck_Van_F",[1.69043,-16.3159,0],280.694,[false,false]],
|
||||
["Exile_Sign_WasteDump",[1.48242,-18.835,0],194.44+180,[false,false]],
|
||||
["Land_MobileScafolding_01_F",[-14.3579,-9.49219,0],266.613,[false,false]],
|
||||
["Land_Bricks_V3_F",[-13.8857,-10.3193,0],0,[false,false]],
|
||||
["Land_Bricks_V2_F",[-13.8774,-8.83252,0],251.086,[false,false]],
|
||||
["Land_Pipes_large_F",[-13.0952,-5.57764,0],142.9,[false,false]],
|
||||
["Land_CinderBlocks_F",[-11.8711,-6.85889,0],0,[false,false]],
|
||||
["Exile_Sign_Equipment",[0.791992,-3.45117,0],60.8907+180,[false,false]],
|
||||
["Exile_Sign_Food",[11.686,14.8994,0],169.855+180,[false,false]],
|
||||
["Land_Sacks_goods_F",[14.4482,13.4688,0],0,[false,false]],
|
||||
["Land_Sacks_heap_F",[9.51367,13.4736,0],0,[false,false]],
|
||||
["Land_Sack_F",[10.1323,14.4917,0],0,[false,false]],
|
||||
["Land_Sack_F",[13.2036,14.8828,0],0,[false,false]],
|
||||
["Land_Sack_F",[11.6104,15.5171,-7.62939e-006],0,[false,false]],
|
||||
["Land_CampingTable_small_F",[13.02,12.8506,0],151.583,[false,false]],
|
||||
["Land_HelipadSquare_F",[-51.4351,-17.4492,0],254.508,[false,false]],
|
||||
["Land_HelipadSquare_F",[-54.355,10.085,0],279.474,[false,false]],
|
||||
["Exile_Sign_Vehicles",[-20.0254,13.8496,0],270.592+180,[false,false]],
|
||||
["Exile_Sign_VehicleCustoms",[-20.4077,8.22119,0],269.223+180,[false,false]],
|
||||
["Land_EngineCrane_01_F",[-21.2827,16.4844,0],229.319,[false,false]],
|
||||
["Land_Wreck_CarDismantled_F",[-25.0684,16.6201,0],217.286,[false,false]],
|
||||
["Fort_Crate_wood",[-14.8433,9.9502,0],165.397,[false,false]],
|
||||
["Fort_Crate_wood",[-13.4341,9.94727,0],0,[false,false]],
|
||||
["Fort_Crate_wood",[-15.4321,8.37939,0],186.337,[false,false]],
|
||||
["AmmoCrates_NoInteractive_Medium",[-16.1963,2.87842,0],0,[false,false]],
|
||||
["AmmoCrates_NoInteractive_Small",[-14.5718,2.41602,0],25.3138,[false,false]],
|
||||
["AmmoCrates_NoInteractive_Large",[-16.1646,0.998047,0],0,[false,false]],
|
||||
["Exile_Sign_Armory",[-15.979,-2.38965,0],62.2217+180,[false,false]],
|
||||
["Exile_Sign_SpecialOperations",[-15.2148,5.38965,0],100.739+180,[false,false]],
|
||||
["Exile_Sign_Hardware",[-13.0625,-12.6558,0],54.8824+180,[false,false]],
|
||||
["Land_Misc_GContainer_Big",[8.04639,-21.145,0],178.924,[false,false]],
|
||||
["Garbage_container",[-3.24854,-6.56543,0],176.687,[false,false]],
|
||||
["Exile_Sign_Office",[18.5098,-8.38574,0],336.059+180,[false,false]],
|
||||
["Land_WoodenTable_large_F",[15.7568,-9.04541,0],80.9305,[false,false]],
|
||||
["Land_CampingChair_V1_F",[13.5264,-8.69238,0],35.5015,[false,false]],
|
||||
["Land_CampingChair_V1_F",[15.3789,-7.51318,0],166.758,[false,false]]
|
||||
];
|
||||
|
||||
_obj
|
||||
private _center = _traderPosition;
|
||||
{
|
||||
private _object = createVehicle [(_x select 0), [0,0,0], [], 0, "CAN_COLLIDE"];
|
||||
_object setDir (_x select 2);
|
||||
_object setPos (_center vectorAdd (_x select 1));
|
||||
_object enableSimulationGlobal false;
|
||||
_object allowDamage false;
|
||||
//private _newPos = getPos _object;
|
||||
//_object setPos _newPos;
|
||||
|
||||
} forEach _objects;
|
Reference in New Issue
Block a user