mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
add optional entries in props array
add dyn sim, allow dmg and set dmg
This commit is contained in:
parent
165ea3ccd5
commit
f582311331
Sources
@ -81,30 +81,32 @@ if !(_debugBox isEqualTo "") then {
|
||||
|
||||
// spawn area props
|
||||
{
|
||||
_class = _x select 0;
|
||||
_pos = _x select 1;
|
||||
_dir = _x select 2;
|
||||
|
||||
_deSimulate = _class isKindOf "ThingX";
|
||||
if (count _x >= 4) then {
|
||||
_deSimulate = (_x select 3) isEqualTo "true";
|
||||
};
|
||||
_x params [
|
||||
["_class",""],
|
||||
["_pos",[0,0,0]],
|
||||
["_dir",0],
|
||||
["_disableSim","true"],
|
||||
["_dynSim","false"],
|
||||
["_allowDmg","false"],
|
||||
["_dmg",0]
|
||||
];
|
||||
|
||||
_ep = createVehicle[_class, _pos, [], 0, "CAN_COLLIDE"];
|
||||
|
||||
_ep allowDamage false;
|
||||
_ep setposATL _pos;
|
||||
if (_dir isEqualType []) then{
|
||||
_ep setposATL _pos;
|
||||
_ep setVectorDirAndUp _dir;
|
||||
} else {
|
||||
_ep setposATL _pos;
|
||||
_ep setDir _dir;
|
||||
};
|
||||
|
||||
if (_deSimulate) then{
|
||||
_deSimulate = _class isKindOf "ThingX";
|
||||
if((_deSimulate) || (_disableSim isEqualTo "true"))then{
|
||||
_ep enableSimulationGlobal false;
|
||||
};
|
||||
|
||||
if(["CfgDynamicSimulation", "enableDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntryV2)then{
|
||||
_ep enableDynamicSimulation (_dynSim isEqualTo "true");
|
||||
};
|
||||
_ep allowDamage (_allowDmg isEqualTo "true");
|
||||
_ep setDamage (_dmg min 0.75);
|
||||
} forEach(getArray(_configWorld >> "propsPos"));
|
||||
|
||||
{
|
||||
|
@ -151,7 +151,22 @@ class CfgEpoch
|
||||
satelliteCompromisedColor = "ColorRed";
|
||||
availableSatellites[] = {"Land_Wreck_Satellite_EPOCH"};
|
||||
|
||||
propsPos[] = {};
|
||||
propsPos[] = {
|
||||
// Will accept several variations of this entry to place objects on the map
|
||||
// _className - STRING - Class name of the object to spawn
|
||||
// _position - ARRAY - posATL of the object placement
|
||||
// _direction - NUMBER or ARRAY - Accepts direction 0-360 or accepts Vector Direction and UP array
|
||||
// _deSimulate - BOOLEAN - Turns simulation off at spawn to save on performance
|
||||
// _dynamicSimulation(OPTIONAL) - BOOLEAN - Add the object to arma3 dynamic sim system
|
||||
// _destruction(OPTIONAL) - BOOLEAN - Setting this to true will allow damage to the object
|
||||
// _damage(OPTIONAL) - NUMBER - Preset damage limited to maximum 0.75 (75% damaged)
|
||||
|
||||
// EXAMPLES:
|
||||
// {_classname, _position, _direction, _deSimulate, _dynamicSimulation, _destruction, _damage},
|
||||
// 1 {"Land_MarketShelter_F", { 13315.3, 14512.4, 0.0361125 }, 119.966, true},
|
||||
// 2 {"Land_MarketShelter_F", { 13315.3, 14512.4, 0.0361125 }, {{0,0,0},{0,0,1}}, true},
|
||||
// 3 {"Land_MarketShelter_F", { 13315.3, 14512.4, 0.0361125 }, {{0,0,0},{0,0,1}}, true, true, false, 0},
|
||||
};
|
||||
staticNpcPos[] = {};
|
||||
forcedVehicleSpawnTable = "";
|
||||
forcedLootSpawnTable = "";
|
||||
|
Loading…
x
Reference in New Issue
Block a user