v20 fixes & tweaks
added the option for no AI at loot crate, added mpkilled event handler to remove debug markers on AI
This commit is contained in:
parent
b08f08ec0c
commit
9c5a506bb8
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// Server Occupation script by second_coming
|
// Server Occupation script by second_coming
|
||||||
//
|
//
|
||||||
SC_occupationVersion = "v19 (15-04-2016)";
|
SC_occupationVersion = "v20 (15-04-2016)";
|
||||||
//
|
//
|
||||||
// http://www.exilemod.com/profile/60-second_coming/
|
// http://www.exilemod.com/profile/60-second_coming/
|
||||||
//
|
//
|
||||||
@ -44,6 +44,7 @@ SC_occupationVersion = "v19 (15-04-2016)";
|
|||||||
SC_fnc_refuel = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\reactions\refuel.sqf";
|
SC_fnc_refuel = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\reactions\refuel.sqf";
|
||||||
SC_fnc_comeUnstuck = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\reactions\comeUnstuck.sqf";
|
SC_fnc_comeUnstuck = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\reactions\comeUnstuck.sqf";
|
||||||
SC_fnc_unitMPHit = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\reactions\unitMPHit.sqf";
|
SC_fnc_unitMPHit = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\reactions\unitMPHit.sqf";
|
||||||
|
SC_fnc_unitMPKilled = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\reactions\unitMPKilled.sqf";
|
||||||
SC_fnc_getOnBus = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\reactions\getOnBus.sqf";
|
SC_fnc_getOnBus = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\reactions\getOnBus.sqf";
|
||||||
SC_fnc_getOffBus = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\reactions\getOffBus.sqf";
|
SC_fnc_getOffBus = compile preprocessFileLineNumbers "\x\addons\a3_exile_occupation\scripts\reactions\getOffBus.sqf";
|
||||||
|
|
||||||
|
@ -45,6 +45,10 @@ for "_i" from 1 to SC_numberofLootCrates do
|
|||||||
_AICount = 1 + (round (random (SC_LootCrateGuards-1)));
|
_AICount = 1 + (round (random (SC_LootCrateGuards-1)));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(_AICount > 0) then
|
||||||
|
{
|
||||||
_spawnPosition = [_position select 0, _position select 1, 0];
|
_spawnPosition = [_position select 0, _position select 1, 0];
|
||||||
_group = [_spawnPosition, _AICount, "random", "random", "bandit"] call DMS_fnc_SpawnAIGroup;
|
_group = [_spawnPosition, _AICount, "random", "random", "bandit"] call DMS_fnc_SpawnAIGroup;
|
||||||
|
|
||||||
@ -58,6 +62,13 @@ for "_i" from 1 to SC_numberofLootCrates do
|
|||||||
|
|
||||||
_logDetail = format ["[OCCUPATION:LootCrates]:: Creating crate %3 at drop zone %1 with %2 guards",_position,_AICount,_i];
|
_logDetail = format ["[OCCUPATION:LootCrates]:: Creating crate %3 at drop zone %1 with %2 guards",_position,_AICount,_i];
|
||||||
[_logDetail] call SC_fnc_log;
|
[_logDetail] call SC_fnc_log;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_logDetail = format ["[OCCUPATION:LootCrates]:: Creating crate %2 at drop zone %1 with no guards",_position,_i];
|
||||||
|
[_logDetail] call SC_fnc_log;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
_box = "CargoNet_01_box_F" createvehicle _position;
|
_box = "CargoNet_01_box_F" createvehicle _position;
|
||||||
|
12
scripts/reactions/unitMPKilled.sqf
Normal file
12
scripts/reactions/unitMPKilled.sqf
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
// Get the variables from the event handler
|
||||||
|
_unit = _this select 0;
|
||||||
|
_killer = _this select 1;
|
||||||
|
|
||||||
|
// remove all eventhandlers from the dead unit
|
||||||
|
_unit removeAllMPEventHandlers "mphit";
|
||||||
|
_unit removeAllMPEventHandlers "mpkilled";
|
||||||
|
|
||||||
|
if(SC_debug) then
|
||||||
|
{
|
||||||
|
{ detach _x; deleteVehicle _x; } forEach attachedObjects _unit;
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user