mirror of
https://github.com/Defent/DMS_Exile.git
synced 2024-08-30 16:52:12 +00:00
c512ef72d2
* NEW CONFIG VALUE: "DMS_HideBox". * Loot vehicles cannot be lifted, pushed, or damaged until the mission is completed successfully. Then the vehicle will be added to the Exile simulation monitor. * AI in vehicles will be automatically ejected on death. * Another potential fix for launchers not despawning off of AI sometimes. * When an AI gunner from an armed ground vehicle is killed, the driver will be switched to the gunner seat after 5-10 seconds. This prevents the driver from driving around aimlessly and trolling. * The above feature should now also work on AI that have been offloaded now (doing so was a major, major pain in the ass, and is the reason why there was no update yesterday).
41 lines
673 B
Plaintext
41 lines
673 B
Plaintext
/*
|
|
DMS_fnc_SpawnCrate
|
|
Created by eraser1
|
|
|
|
Usage:
|
|
[
|
|
_crateClassName,
|
|
_pos
|
|
] call DMS_fnc_SpawnCrate;
|
|
Returns crate object
|
|
|
|
*/
|
|
|
|
private ["_crateClassName", "_pos", "_crate"];
|
|
|
|
_OK = params
|
|
[
|
|
["_crateClassName","ERROR",[""]],
|
|
["_pos","ERROR",[[]],[3]]
|
|
];
|
|
|
|
if (!_OK) then
|
|
{
|
|
diag_log format ["DMS ERROR :: Calling DMS_SpawnCrate with invalid parameters: %1",_this];
|
|
};
|
|
|
|
_crate = createVehicle [_crateClassName,_pos,[], 0, "CAN_COLLIDE"];
|
|
|
|
_crate allowDamage false;
|
|
|
|
clearWeaponCargoGlobal _crate;
|
|
clearItemCargoGlobal _crate;
|
|
clearMagazineCargoGlobal _crate;
|
|
clearBackpackCargoGlobal _crate;
|
|
|
|
if (DMS_HideBox) then
|
|
{
|
|
_crate hideObjectGlobal true;
|
|
};
|
|
|
|
_crate; |