bus changes and a few tweaks

This commit is contained in:
second_coming 2016-04-11 21:17:34 +01:00
parent a6e9f43771
commit 69a2c8bc17
7 changed files with 31 additions and 21 deletions

View File

@ -44,10 +44,13 @@ SC_buildings = [ "Land_Cargo_Patrol_V1_F","Land_i_Barracks_V1_F",
SC_occupyStatic = false; // true if you want to garrison AI in specific locations (not working yet)
SC_occupyVehicle = true; // true if you want to have roaming AI vehicles
SC_occupyVehiclesLocked = true; // true if AI vehicles to stay locked until all the linked AI are dead
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_occupyPublicBus = true; // true if you want a roaming bus service
SC_occupyPublicBusClass = "Exile_Car_Ikarus_Party";
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)
@ -86,6 +89,7 @@ if (worldName == 'Namalsk') then
SC_numberofLootCrates = 3;
SC_numberofHeliCrashes = 2;
SC_maxNumberofBoats = 1;
SC_occupyPublicBusClass = "Exile_Car_LandRover_Urban";
};

View File

@ -2,7 +2,7 @@
//
// Server Occupation script by second_coming
//
SC_occupationVersion = "v8 (09-04-2016)";
SC_occupationVersion = "v9 (11-04-2016)";
//
// http://www.exilemod.com/profile/60-second_coming/
//
@ -23,6 +23,7 @@ SC_occupationVersion = "v8 (09-04-2016)";
[] spawn
{
waitUntil { !(isNil "DMS_MinMax_Y_Coords") };
sleep 30;
diag_log format ["[OCCUPATION MOD]:: Occupation %2 Loading Config at %1",time,SC_occupationVersion];

View File

@ -27,7 +27,7 @@ busDriver addHeadgear "H_Cap_blk";
busDriver setCaptive true;
// Spawn busDrivers Vehicle
_publicBus = createVehicle ["Exile_Car_Ikarus_Party", _spawnLocation, [], 0, "CAN_COLLIDE"];
_publicBus = createVehicle [SC_occupyPublicBusClass, _spawnLocation, [], 0, "CAN_COLLIDE"];
SC_publicBusArray = SC_publicBusArray + [_publicBus];
_publicBus setVariable ["SC_assignedDriver", busDriver,true];
_publicBus setVariable ["SC_vehicleSpawnLocation", _spawnLocation,true];
@ -52,7 +52,7 @@ busDriver assignasdriver _publicBus;
{
_markerName = _x;
_markerPos = getMarkerPos _markerName;
if (markerType _markerName == "ExileTraderZone") then
if (markerType _markerName == "ExileTraderZone" OR markerType _markerName == "o_unknown") then
{
_wp = _group addWaypoint [_markerPos, 100];
_wp setWaypointType "MOVE";
@ -71,7 +71,7 @@ _wp setWaypointspeed "LIMITED";
_busPos = position _publicBus;
_mk = createMarker ["busLocation",_busPos];
"busLocation" setMarkerType "mil_warning";
"busLocation" setMarkerType "Vehicle";
"busLocation" setMarkerText "Public Bus";
diag_log format['[OCCUPATION:publicBus] Running'];
@ -83,7 +83,7 @@ while {true} do
_pos = position _publicBus;
_mk setMarkerPos _pos;
_nearPlayers = (count (_pos nearEntities [['Exile_Unit_Player'],75]));
_nearPlayers = (count (_pos nearEntities [['Exile_Unit_Player'],25]));
if (_nearPlayers >= 1) then
{

View File

@ -105,9 +105,19 @@ if(_vehiclesToSpawn >= 1) then
_vehicle setVariable ["SC_vehicleSpawnLocation", _spawnLocation,true];
_vehicle setFuel 1;
_vehicle engineOn true;
_vehicle lock true;
if(SC_occupyVehiclesLocked) then
{
_vehicle lock 2;
_vehicle setVehicleLock "LOCKED";
_vehicle setVariable ["ExileIsLocked", 1, true];
}
else
{
_vehicle lock 0;
_vehicle setVehicleLock "UNLOCKED";
_vehicle setVariable ["ExileIsLocked", 0, true];
};
_vehicle setSpeedMode "LIMITED";
_vehicle limitSpeed 60;
_vehicle action ["LightOn", _vehicle];
@ -179,7 +189,7 @@ if(_vehiclesToSpawn >= 1) then
[_group, _spawnLocation, 2000] call bis_fnc_taskPatrol;
_group setBehaviour "AWARE";
_group setBehaviour "SAFE";
_group setCombatMode "RED";
sleep 0.2;

View File

@ -34,25 +34,17 @@ if(count(crew _vehicle) > 0)then
_originalSpawnLocation = _vehicle getVariable "SC_vehicleSpawnLocation";
_group = group _vehicle;
//_vehClass = _vehicle getVariable "vehClass";
_vehClass = typeOf _vehicle;
if(_vehicle isKindOf "LandVehicle") then
{
//_newPos = [ _curPos, 1, 50, [ 0, 0, 1, 0, 0, 0, 0, 0, true] ] call DMS_fnc_FindSafePos_InRange;
//_newPos = [_curPos, 5, 100, 3, 0, 20, 0] call BIS_fnc_findSafePos;
_tempPos = _curPos findEmptyPosition [0,100,_vehClass];
_tempPos = _curPos findEmptyPosition [0,150,_vehClass];
_newPos = [_tempPos select 0, _tempPos select 1, 0];
//_newPos = _curPos;
//_vehicle setDamage 0.2;
};
if(_vehicle isKindOf "Ship") then
{
//_newPos = [ _curPos, 1,50, [ 0, 0, 1, 0, 0, 0, 0, 0, true, true ] ] call DMS_fnc_FindSafePos_InRange;
_newPos = [_curPos, 5, 100, 3, 2, 20, 0] call BIS_fnc_findSafePos;
//_tempPos = _curPos findEmptyPosition [0,100,_vehClass];
//_newPos = [_tempPos select 0, _tempPos select 1, 0];
_newPos = _curPos;
_vehicle setDamage 0.2;
};

View File

@ -76,4 +76,7 @@ else
{
_logDetail = format ["[OCCUPATION:Vehicle]:: No replacement Driver found for vehicle %1",_vehicle];
[_logDetail] call SC_fnc_log;
_vehicle lock 0;
_vehicle setVehicleLock "UNLOCKED";
_vehicle setVariable ["ExileIsLocked", 0, true];
};

View File

@ -90,7 +90,7 @@ if(_damagedWheels > 0 OR _engineDamage OR _fueltankDamage) then
_driver action ["movetodriver", _vehicle];
_vehicle forceSpeed -1;
[_group, _spawnLocation, 2000] call bis_fnc_taskPatrol;
_group setBehaviour "AWARE";
_group setBehaviour "SAFE";
_group setCombatMode "RED";
};