From ede1318cce86ab10053deb69ab1d00f8085db160 Mon Sep 17 00:00:00 2001 From: Ghostrider-GRG- Date: Mon, 25 Jun 2018 21:05:50 -0400 Subject: [PATCH] Update Crate Spawning Script to reduce collisions with nearby objects and set relative to terrain. --- .../Compiles/Missions/GMS_fnc_spawnCrate.sqf | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnCrate.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnCrate.sqf index 8232b18..3c7ede6 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnCrate.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnCrate.sqf @@ -18,13 +18,16 @@ private ["_crate"]; params["_coords",["_crateType","Box_NATO_Wps_F"]]; -_crate = createVehicle [_crateType,_coords,[], 0, "CAN_COLLIDE"]; +_crate = createVehicle [_crateType,_coords,[], 2, "NONE"]; _crate setVariable ["LAST_CHECK", 100000]; _crate allowDamage false; _crate enableRopeAttach false; [_crate] call blck_fnc_emptyObject; -_crate setPosATL _coords; -_crate setVectorUp [0,0,0]; +uiSleep 1; +//_crate setPosATL _coords; +//_crate setVectorUp [0,0,1]; +_crate setVectorUp surfaceNormal position _crate; +// the function to have a lightsource on underwater objects needs work. if ((_coords select 2) < 0 || surfaceIsWater (_coords)) then {