mirror of
https://github.com/Defent/DMS_Exile.git
synced 2024-08-30 16:52:12 +00:00
More fixes + SpawnCrate
Created function SpawnCrate Updated missions to use DMS_SpawnCrate Fix (I think) issue with _side being passed to onkilled updated test PBO
This commit is contained in:
parent
a883bff0c0
commit
6e3a9b8615
@ -32,6 +32,7 @@ DMS_SetGroupBehavior = compileFinal preprocessFileLineNumbers "\x\addons\dms\
|
||||
DMS_AddMissionToMonitor = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\AddMissionToMonitor.sqf";
|
||||
DMS_CreateMarker = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\CreateMarker.sqf";
|
||||
DMS_FindSuppressor = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\FindSuppressor.sqf";//<--- TODO Improve
|
||||
DMS_SpawnCrate = compileFinal preprocessFileLineNumbers "\x\addons\dms\scripts\SpawnCrate.sqf";
|
||||
|
||||
//Load config
|
||||
#include "config.sqf";
|
@ -38,7 +38,7 @@ _group =
|
||||
|
||||
|
||||
// Create Crate
|
||||
_crate = createVehicle ["Box_NATO_Wps_F",_pos,[], 0, "CAN_COLLIDE"];
|
||||
_crate = ["Box_NATO_Wps_F",_pos] call DMS_SpawnCrate;
|
||||
|
||||
// Set crate loot values
|
||||
_crate_loot_values =
|
||||
|
@ -35,7 +35,7 @@ _group =
|
||||
|
||||
|
||||
// Create Crate
|
||||
_crate = createVehicle ["Box_NATO_Wps_F",_pos,[], 0, "CAN_COLLIDE"];
|
||||
_crate = ["Box_NATO_Wps_F",_pos] call DMS_SpawnCrate;
|
||||
|
||||
// Set crate loot values
|
||||
_crate_loot_values =
|
||||
|
@ -35,7 +35,7 @@ _group =
|
||||
|
||||
|
||||
// Create Crate
|
||||
_crate = createVehicle ["Box_NATO_Wps_F",_pos,[], 0, "CAN_COLLIDE"];
|
||||
_crate = ["Box_NATO_Wps_F",_pos] call DMS_SpawnCrate;
|
||||
|
||||
// Set crate loot values
|
||||
_crate_loot_values =
|
||||
|
@ -35,7 +35,7 @@ _group =
|
||||
|
||||
|
||||
// Create Crate
|
||||
_crate = createVehicle ["Box_NATO_Wps_F",_pos,[], 0, "CAN_COLLIDE"];
|
||||
_crate = ["Box_NATO_Wps_F",_pos] call DMS_SpawnCrate;
|
||||
|
||||
// Set crate loot values
|
||||
_crate_loot_values =
|
||||
|
@ -270,7 +270,7 @@ else
|
||||
|
||||
|
||||
// Soldier killed event handler
|
||||
_unit addMPEventHandler ["MPKilled",{[_this, _side, "soldier"] call DMS_OnKilled;}];
|
||||
_unit addMPEventHandler ["MPKilled",'[_this, '+str _side+', "soldier"] call DMS_OnKilled;'];
|
||||
|
||||
_unit enableAI "TARGET";
|
||||
_unit enableAI "AUTOTARGET";
|
||||
|
34
@ExileServer/addons/a3_dms/scripts/SpawnCrate.sqf
Normal file
34
@ExileServer/addons/a3_dms/scripts/SpawnCrate.sqf
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
DMS_SpawnCrate
|
||||
Created by eraser1
|
||||
|
||||
Usage:
|
||||
[
|
||||
_crateClassName,
|
||||
_pos
|
||||
] call DMS_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"];
|
||||
|
||||
clearWeaponCargoGlobal _crate;
|
||||
clearItemCargoGlobal _crate;
|
||||
clearMagazineCargoGlobal _crate;
|
||||
clearBackpackCargoGlobal _crate;
|
||||
|
||||
_crate;
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user