Browse Source

Laser, new boxes, splints

Erliens 4 years ago
parent
commit
d29220f6b1

+ 10 - 5
addons - Copy/RD501_Vehicles/land/resupply_box/config.cpp

@@ -46,6 +46,9 @@ class DefaultEventhandlers;
 class CfgVehicles
 {
 	class plp_ct_HighSecContBlack;
+	class 442_box5_1;
+	class 442_box10;
+	class 442_box4;
 	class SWOP_BOX_BASE;
 		class plp_ct_HighSecBigBlack;
 
@@ -153,7 +156,7 @@ class CfgVehicles
 		class EventHandlers :DefaultEventhandlers{};
 	};
 
-	class macro_new_vehicle(resuppy_box,small_medical): SWOP_BOX_BASE
+	class macro_new_vehicle(resuppy_box,small_medical): 442_box5_1
 	{
 		author = "RD501";
 		class SimpleObject
@@ -168,7 +171,6 @@ class CfgVehicles
 		scope = 2;
 		scopeCurator = 2;
 		displayName = "Republic Squad Resupply (Medical)";
-		model = "\SWOP_props_new\Containers\BoxMedium3r.p3d";
 		icon = "iconObject_4x5";
 		vehicleClass = "Ammo";
 		editorCategory = macro_editor_cat(suppplies)
@@ -181,13 +183,15 @@ class CfgVehicles
             {
                 #include "medical_small_items.hpp"				
             };
+			class TransportMagazines{};
+			class TransportBackpacks{};
 		class EventHandlers :DefaultEventhandlers{
 			init ="ACE_maxWeightCarry = 20000;ACE_maxWeightDrag = 20000;";
 		};
 			
 	};
 
-	class macro_new_vehicle(resuppy_box,small_ammo): SWOP_BOX_BASE
+	class macro_new_vehicle(resuppy_box,small_ammo): 442_box10
 	{
 		author = "RD501";
 		class SimpleObject
@@ -204,7 +208,6 @@ class CfgVehicles
 		scopeCurator = 2;
 		displayName = "Republic Squad Resupply (Ammo)";
 		editorSubcategory = macro_editor_cat(resupply)
-		model = "\SWOP_props_new\Containers\BoxMedium3w.p3d";
 		icon = "iconObject_4x5";
 		vehicleClass = "Ammo";
 		editorCategory = macro_editor_cat(suppplies)
@@ -222,8 +225,9 @@ class CfgVehicles
         {
         	#include "ammo_small_weap.hpp"
         };
+		class TransportBackpacks{};
 	};
-	class macro_new_vehicle(resuppy_box,small_uav): plp_ct_HighSecBigBlack
+	class macro_new_vehicle(resuppy_box,small_uav): 442_box4
 	{
 		author = "RD501";
 		class SimpleObject
@@ -257,6 +261,7 @@ class CfgVehicles
 						backpack="B_UGV_02_Demining_backpack_F";
 						count=1;
 					};
+				class TransportMagazines{};
 			};
 		
 

+ 5 - 0
addons - Copy/RD501_Vehicles/land/resupply_box/medical_small_items.hpp

@@ -3,6 +3,11 @@ class _xx_ACE_tourniquet
     name = "ACE_tourniquet";
     count = 15;
 };
+class _xx_ACE_splint
+{
+    name = "ACE_splint";
+    count = 15;
+};
 class _xx_ACE_plasmaIV_250
 {
     name = "ACE_plasmaIV_250";

+ 47 - 18
addons - Copy/RD501_Zeus/config.cpp

@@ -9,16 +9,48 @@ class CfgPatches
 		requiredVersion = 0.1;
 		units[] = {
 			macro_new_ordnance(IonBomb),
-			macro_new_ordnance(AV7),
-			macro_new_ordnance(AV7_Cluster),
+			macro_new_ordnance(Orbit),
 			macro_new_ordnance(ModuleSquadShield),
 			macro_new_ordnance(ModuleDioxis),
 			macro_new_ordnance(ModuleShadow),
+			macro_new_ordnance(OrbitalLaser),
 			rd501_moduleJammerSettings
 		};
 		weapons[] = {};
 	};
 };
+class CfgFunctions
+{
+	class tts_beam
+	{
+		class beam
+		{
+			file = "\RD501_Zeus\functions";
+			class beam {};
+			class rayParticles {};
+			class ragdollUnit {};
+			class explosionDamage {};
+			class explosionParticles {};
+			class postProcessEffects {};
+			class customZeusModules {};
+		};
+	};
+};
+class CfgSounds
+{
+	class laser_impact
+	{
+		name = "laser_impact";
+		sound[] = {"\RD501_Zeus\sounds\laser_impact.ogg", 50, 1, 5000};
+		titles[] = {};
+	};
+	class laser
+	{
+		name = "laser";
+		sound[] = {"\RD501_Zeus\sounds\laser.ogg", 50, 1, 5000};
+		titles[] = {};
+	};
+};
 class CfgFactionClasses {
     class Jammers {
         displayName = "Jammers";
@@ -31,6 +63,7 @@ class CfgVehicles
 	class Module_F;
 	class ModuleOrdnance_F;
 	class ModuleChemlight_F;
+	class ModuleOrdnanceHowitzer_F;
     class rd501_moduleJammerSettings: Module_F  {
 		author = "RD501";
         category = "Jammers";
@@ -97,38 +130,34 @@ class CfgVehicles
 		ammo = macro_new_ordnance_ammo(IonBomb)
 		delete Arguments;
 	};
-	class macro_new_ordnance(Orbit): macro_new_ordnance(IonBomb)
+	class macro_new_ordnance(Orbit): ModuleOrdnance_F
 	{
 		author = "RD501";
 		_generalMacro = macro_new_ordnance(Orbit)
 		displayName = "Orbital Strike";
-		model = "\a3\Modules_F_Curator\Ordnance\surfaceRocket.p3d";
+		model = "\a3\Modules_F_Curator\Ordnance\surfacehowitzer.p3d";
 		isGlobal = 1;
 		scope = 1;
 		scopeCurator = 2;
 		simulation = "house";
 		category = "Ordnance";
 		portrait = "\a3\Modules_F_Curator\Data\portraitOrdnanceMortar_ca.paa";
-		ammo = macro_new_ordnance_ammo(Orbit)
+		ammo = macro_new_ordnance_ammo(Orbital)
 		delete Arguments;
 
 	};
-	class macro_new_ordnance(OrbitalCluster): macro_new_ordnance(IonBomb)
-	{
+     class macro_new_ordnance(OrbitalLaser): Module_F {
 		author = "RD501";
-		_generalMacro = macro_new_ordnance(OrbitalCluster)
-		model = "\a3\Modules_F_Curator\Ordnance\surfacehowitzer.p3d";
-		simulation = "house";
+        curatorCanAttach = 1;
+		isGlobal = 1;
 		scope = 1;
 		scopeCurator = 2;
-		isGlobal = 1;
-		category = "Ordnance";
-		displayName = "AV-7 Cluster Strike";
-		portrait = "\a3\Modules_F_Curator\Data\portraitOrdnanceMortar_ca.paa";
-		ammo = macro_new_ordnance_ammo(OrbitalCluster)
-		delete Arguments;
-	};
- 
+        isTriggerActivated = 0;
+        category = "Ordnance";
+		displayName = "Orbital Laser";
+        function = "tts_beam_fnc_beam";
+		portrait = "RD501_Zeus\ui\explosion_zeus_icon_small.paa";
+    };
 };
 class CfgAmmo
 {

+ 72 - 0
addons - Copy/RD501_Zeus/functions/fn_beam.sqf

@@ -0,0 +1,72 @@
+/*
+	Author: TheTimidShade
+
+	Description:
+		Creates laser beam on the given position. Should be executed on all connected clients and server using remoteExec.
+
+	Parameters:
+		0: OBJECT - The object the beam is created above.
+		1: ARRAY (OPTIONAL) - Colour of the beam in format [r,g,b].
+		2: ARRAY (OPTIONAL) - Colour of dust created on impact in format [r,g,b].
+		
+	Returns:
+		NONE
+*/
+
+params [
+	["_target", objNull, [objNull]],
+	["_beamColour", [1,0.6,0.2], [[]]],
+	["_debrisColour", [0.3, 0.27, 0.15], [[]]]
+];
+
+// input validation
+if (isNull _target) exitWith {systemChat "Invalid position given for beam target! Exited";};
+if (count _beamColour < 3) then {_beamColour = [1,0.6,0.2]; systemChat "Invalid colour given for beam, default used instead";};
+if (count _debrisColour < 3) then {_debrisColour = [0.3, 0.27, 0.15]; systemChat "Invalid colour given for beam debris, default used instead";};
+
+private _maxKillRange = 200;
+private _maxDamageRange = 400;
+
+private _targetPos = getPosATL _target;
+
+// create emitters
+private _impactEmitter = "Land_HelipadEmpty_F" createVehicleLocal _targetPos;
+private _beamEmitter = "Land_Battery_F" createVehicleLocal _targetPos;
+_beamEmitter setPosATL [_targetPos#0, _targetPos#1, 2000];
+
+// accelerate beam emitter towards ground
+_beamEmitter setVelocity [0,0,-600];
+
+// create bright flash when beam is initially fired
+_flash = "#lightpoint" createVehicleLocal (getpos _beamEmitter);
+_flash setLightBrightness 300;
+_flash setLightAmbient _beamColour;
+_flash setLightColor _beamColour;
+_flash lightAttachObject [_beamEmitter, [0,0,200]];
+_flash spawn {sleep 0.1; deleteVehicle _this;};
+
+// create beam particles
+[_beamEmitter, _beamColour, _targetPos] spawn tts_beam_fnc_rayParticles;
+
+// wait until the beam is almost halfway and play laser sound
+waitUntil {sleep 0.01; ((getPosATL _beamEmitter)#2 < 750)};
+_impactEmitter say3D ["laser", 20000, 1, false];
+
+// wait until touching ground/near target
+waitUntil {sleep 0.01; vectorMagnitude (velocity _beamEmitter) < 20 || _beamEmitter distance _targetPos < 5 || (getPosATL _beamEmitter)#2 < 5};
+_impactEmitter say3D ["laser_impact", 20000, 1, false];
+_impactEmitter setPosATL (getPosATL _beamEmitter);
+deleteVehicle _beamEmitter;
+
+// destroy/damage any nearby units/objects/buildings
+if (isServer) then {[_impactEmitter, _maxKillRange, _maxDamageRange] spawn tts_beam_fnc_explosionDamage;};
+
+// explosion particles
+[_impactEmitter, _debrisColour] spawn tts_beam_fnc_explosionParticles;
+
+// impact post processing effects
+[_target] spawn tts_beam_fnc_postProcessEffects;
+
+sleep 30;
+
+deleteVehicle _impactEmitter;

+ 114 - 0
addons - Copy/RD501_Zeus/functions/fn_customZeusModules.sqf

@@ -0,0 +1,114 @@
+/*
+	Author: TheTimidShade
+
+	Description:
+		Initialises custom modules for Achilles & ZEN if enabled
+
+	Parameters:
+		NONE
+		
+	Returns:
+		NONE
+*/
+
+sleep 1;
+if (!isNull (getAssignedCuratorLogic player) && {isClass (configFile >> "CfgPatches" >> "achilles_modules_f_achilles")}) then {
+	["Fire Support", "Beam Laser Strike", 
+	{
+		params [["_position", [0,0,0], [[]], 3], ["_objectUnderCursor", objNull, [objNull]]];
+
+		private _dialogResult = [
+			"Beam Laser Strike",
+			[
+				["Beam Colour", ["Default", "Red", "Orange", "Yellow", "Green", "Cyan", "Pink", "Purple"], 0],
+				["Debris Colour", ["Default", "Mud", "Snow", "Sand"], 0]
+			]
+		] call Ares_fnc_showChooseDialog;
+
+		if (_dialogResult isEqualTo []) exitWith{}; // if dialog was closed exit
+
+		private _beamColour = [1,0.6,0.2];
+		switch (_dialogResult#0) do { // select beam colour
+			case 0: {_beamColour = [1,0.6,0.2];}; 		// default
+			case 1: {_beamColour = [0.5,0,0];}; 		// red
+			case 2: {_beamColour = [0.3,0.15,0.1];}; 	// orange
+			case 3: {_beamColour = [1,0.9,0];}; 		// yellow
+			case 4: {_beamColour = [0,0.5,0];};			// green
+			case 5: {_beamColour = [0,0.5,0.5];}; 		// cyan
+			case 6: {_beamColour = [1,0,0.6];}; 		// pink
+			case 7: {_beamColour = [0.5,0,1];}; 		// purple
+		};
+		
+		private _debrisColour = [0.3, 0.27, 0.15]; 
+		switch (_dialogResult#1) do { // select debris colour
+			case 0: {_debrisColour = [0.3, 0.27, 0.15];}; 	// default
+			case 1: {_debrisColour = [0.15, 0.11, 0.08];}; 	// mud
+			case 2: {_debrisColour = [1, 1, 1];}; 			// snow
+			case 3: {_debrisColour = [1, 0.8, 0.3];}; 		// sand
+		};
+
+		private _beamTarget = "Land_HelipadEmpty_F" createVehicle _position;
+
+		[_beamTarget, _beamColour, _debrisColour] remoteExec ["tts_beam_fnc_beam", 0, false]; // fire beam
+
+		_beamTarget spawn {sleep 60; deleteVehicle _this;}; // wait and cleanup target pos
+
+	}] call Ares_fnc_RegisterCustomModule;
+};
+
+if (!isNull (getAssignedCuratorLogic player) && {isClass (configFile >> "CfgPatches" >> "zen_main")}) then {
+	["Fire Support", "Beam Laser Strike",
+	{
+		params [["_position", [0,0,0], [[]], 3], ["_attachedObject", objNull, [objNull]]];
+
+		[
+			"Beam Laser Strike", // title
+		 	[ // array of controls for dialog
+				["COMBO", ["Beam Colour", "Colour of laser particles and glow"],
+					[ // control args
+						["Default", "Red", "Orange", "Yellow", "Green", "Cyan", "Pink", "Purple"], // return values
+						["Default", "Red", "Orange", "Yellow", "Green", "Cyan", "Pink", "Purple"], // labels
+						0 // element 0 is default selected
+					]
+				],
+				["COMBO", ["Debris Colour", "Colour of dust kicked up by explosion"],
+					[ // control args
+						["Default", "Mud", "Snow", "Sand"], // return values
+						["Default", "Mud", "Snow", "Sand"], // labels
+						0 // element 0 is default selected
+					]
+				]
+			],
+			{ // code run on dialog closed (only run if OK is clicked)
+				params ["_dialogResult", "_args"];
+				
+				private _beamColour = _dialogResult#0;
+				switch (_dialogResult#0) do { // select beam colour
+					case "Default": {_beamColour = [1,0.6,0.2];}; 	// default
+					case "Red": {_beamColour = [0.5,0,0];}; 		// red
+					case "Orange": {_beamColour = [0.3,0.15,0.1];}; // orange
+					case "Yellow": {_beamColour = [1,0.9,0];}; 		// yellow
+					case "Green": {_beamColour = [0,0.5,0];};		// green
+					case "Cyan": {_beamColour = [0,0.5,0.5];}; 		// cyan
+					case "Pink": {_beamColour = [1,0,0.6];}; 		// pink
+					case "Purple": {_beamColour = [0.5,0,1];}; 		// purple
+				};
+				
+				private _debrisColour = _dialogResult#1; 
+				switch (_dialogResult#1) do { // select debris colour
+					case "Default": {_debrisColour = [0.3, 0.27, 0.15];}; 	// default
+					case "Mud": {_debrisColour = [0.15, 0.11, 0.08];}; 		// mud
+					case "Snow": {_debrisColour = [1, 1, 1];}; 				// snow
+					case "Sand": {_debrisColour = [1, 0.8, 0.3];}; 			// sand
+				};
+
+				private _beamTarget = "Land_HelipadEmpty_F" createVehicle _args#0;
+
+				[_beamTarget, _beamColour, _debrisColour] remoteExec ["tts_beam_fnc_beam", 0, false]; // fire beam
+
+				_beamTarget spawn {sleep 60; deleteVehicle _this;}; // wait and cleanup target pos
+			}, {}, [_position] // args
+		] call zen_dialog_fnc_create;
+	}] call zen_custom_modules_fnc_register
+};
+

+ 61 - 0
addons - Copy/RD501_Zeus/functions/fn_explosionDamage.sqf

@@ -0,0 +1,61 @@
+/*
+	Author: TheTimidShade
+
+	Description:
+		Damages/destroys/throws/ragdolls any units within the killzone of the beam. Should only be executed on the server/host player.
+
+	Parameters:
+		0: OBJECT - Impact emitter object passed from fnc_beam.
+		1: NUMBER - Maximum radius to deal lethal damage to units/vehicles.
+		2: NUMBER - Maximum radius to deal damage/ragdoll units.
+		
+	Returns:
+		NONE
+*/
+
+if (!isServer) exitWith {}; // make sure this function is only run on server
+
+params ["_impactEmitter","_maxKillRange", "_maxDamageRange"];
+
+private _ace_enabled = isClass(configFile >> "CfgPatches" >> "ace_main");
+
+_nearObjects = nearestObjects[_impactEmitter, ["Building", "House", "Man", "LandVehicle", "Air"], _maxDamageRange];
+{
+	private _distance = _impactEmitter distance _x;
+	private _dirFromTo = (getPosATL _impactEmitter) vectorFromTo (getPosATL _x);
+	
+	_effectCoef = if (_distance < _maxKillRange) then {1} else {
+		private _coef = (_distance - _maxKillRange)/(_maxDamageRange - _maxKillRange); // should be 0 at maxKillRange, 1 at edge of maxDamageRange
+		(1 - _coef)
+	};
+	
+	private _throwSpeedKill = [30*_dirFromTo#0, 30*_dirFromTo#1, 5] vectorMultiply _effectCoef;
+	private _throwSpeedDamage = [15*_dirFromTo#0, 15*_dirFromTo#1, 5] vectorMultiply _effectCoef;
+
+	if (_distance <= _maxKillRange) then { // if unit is within the killzone, instantly destroy it
+		if (!(_x isKindOf "Static")) then {[_x, _throwSpeedKill] remoteExec ["setVelocity", _x, false];}; // throw non-static objects
+		[_x, _impactEmitter] spawn {sleep 0.001; if (_this#0 != _this#1) then {_this#0 setDamage 1};};
+	} else { // if not, damage it depending on distance
+		if (_distance <= _maxDamageRange) then {
+			if (!(_x isKindOf "Static")) then {[_x, _throwSpeedDamage] remoteExec ["setVelocity", _x, false];}; // throw non-static objects
+			
+			private _damageToAdd = 0.5*(_effectCoef^2);
+			if (!(_x isKindOf "Man")) then { // damage vehicles/buildings
+				_x setDamage ((damage _x) + _damageToAdd);
+			} else { // damage unit
+				if (_ace_enabled) then { // check if ace is enabled, use ace damage if it is
+					_damageRegions = ["body", "hand_l", "hand_r", "leg_l", "leg_r"];
+					_damagePoint = selectRandom _damageRegions;
+					[_x, _damageToAdd*2, _damagePoint, "explosive"] remoteExec ["ace_medical_fnc_addDamageToUnit", _x, false];
+				} else {
+					_x setDamage ((damage _x) + _damageToAdd);
+				};
+
+				if (_effectCoef >= 0.1) then { // ragdoll the unit if they are close enough to the explosion
+					_x spawn {sleep 0.001; [_this] remoteExec ["tts_beam_fnc_ragdollUnit", _this, false];};
+				};
+			};
+		};
+	};
+	sleep 0.0005;
+} foreach _nearObjects;

+ 53 - 0
addons - Copy/RD501_Zeus/functions/fn_explosionParticles.sqf

@@ -0,0 +1,53 @@
+/*
+	Author: TheTimidShade
+
+	Description:
+		Creates dust cloud particles and rock debris for beam impact.
+
+	Parameters:
+		0: OBJECT - The object the beam is created above.
+		1: ARRAY - Colour of dust/rock debris created on impact in format [r,g,b].
+
+	Returns:
+		NONE
+*/
+
+if (!hasInterface) exitWith {}; // dedicated server & HC should not run particles
+
+params ["_impactEmitter", "_col"];
+
+// dust wave
+_wave = "#particlesource" createVehicleLocal getPos _impactEmitter;
+_wave setParticleParams [["A3\Data_F\ParticleEffects\Universal\universal.p3d", 16, 7, 48], "", "Billboard", 1, 7, [0, 0, 0],[0, 0, 0], 0, 1.5, 1, 0, [50, 100], [[_col#0, _col#1, _col#2, 0.5], [_col#0, _col#1, _col#2, 0.5], [_col#0, _col#1, _col#2, 0.3], [_col#0, _col#1, _col#2, 0]], [1,0.5], 0.1, 1, "", "", _impactEmitter];
+_wave setParticleRandom [2, [20, 20, 20], [5, 5, 0], 0, 0, [0, 0, 0, 0.1], 0, 0];
+_wave setParticleCircle [50, [-80, -80, 2.5]];
+_wave setDropInterval 0.001;
+
+// dust cloud
+_cloud = "#particlesource" createVehicleLocal getPos _impactEmitter;
+_cloud setParticleParams [["A3\Data_F\ParticleEffects\Universal\universal.p3d", 16, 7, 48], "", "Billboard", 1, 18, [0, 0, 0],[0, 0, 0], 0, 1.5, 1, 0, [50, 65], [[_col#0, _col#1, _col#2, 0.5], [_col#0, _col#1, _col#2, 0.5], [_col#0, _col#1, _col#2, 0.3], [_col#0, _col#1, _col#2, 0]], [1,0.5], 0.1, 1, "", "", _impactEmitter];
+_cloud setParticleRandom [2, [10, 10, 5], [10, 10, 5], 0, 0, [0, 0, 0, 0.1], 0, 0];
+_cloud setParticleCircle [50, [8, 8, 5]];
+_cloud setDropInterval 0.005;
+
+// dust tower
+_tower = "#particlesource" createVehicleLocal getPos _impactEmitter;
+_tower setParticleParams [["A3\Data_F\ParticleEffects\Universal\universal.p3d", 16, 7, 48], "", "Billboard", 1, 18, [0, 0, 0],[0, 0, 0], 0, 1.5, 1, 0, [40, 90], [[_col#0, _col#1, _col#2, 0.5], [_col#0, _col#1, _col#2, 0.5], [_col#0, _col#1, _col#2, 0.3], [_col#0, _col#1, _col#2, 0]], [1,0.5], 0.1, 1, "", "", _impactEmitter];
+_tower setParticleRandom [2, [10, 10, 5], [5, 5, 20], 0, 0, [0, 0, 0, 0.1], 0, 0];
+_tower setParticleCircle [20, [2, 2, 20]];
+_tower setDropInterval 0.01;
+
+// rocks
+_debris = "#particlesource" createVehicleLocal (getPosATL _impactEmitter);
+_debris setParticleParams [["\A3\data_f\ParticleEffects\Universal\Mud.p3d", 1, 0, 1, 1], "", "SpaceObject", 1,30,[0,0,0],[0, 0, 20], 1, 500,15,0,[2.5],[[0, 0, 0, 1]], [0.125],0, 0, "","",_impactEmitter, 0, true,0];
+_debris setParticleRandom [10,[25, 25, 0.1],[30, 30, 20],0.5,1,[0, 0, 0, 0],0,0,0,0];
+_debris setParticleCircle [0.5,[10, 10, 10]];
+_debris setDropInterval 0.0004;
+
+sleep 0.1;
+
+deleteVehicle _debris;
+
+sleep 0.9;
+
+{deleteVehicle _x} forEach [_wave, _cloud, _tower, _debris];

+ 40 - 0
addons - Copy/RD501_Zeus/functions/fn_postProcessEffects.sqf

@@ -0,0 +1,40 @@
+/*
+	Author: TheTimidShade
+
+	Description:
+		Handles post processing effects for beam impact.
+
+	Parameters:
+		0: OBJECT - Beam target object, used to determine if player is close enough to need ppeffects
+		
+	Returns:
+		NONE
+*/
+
+params ["_target"];
+
+if (!hasInterface) exitWith {}; // dedicated server & HC do not need to run post process effects
+if (player distance _target > 1000) exitWith {}; // don't play ppeffects if player is far away
+
+// blur
+[] spawn {		
+	cutText ["", "WHITE OUT", 1];
+	titleCut ["", "WHITE IN", 1];
+	"dynamicBlur" ppEffectEnable true;   
+	"dynamicBlur" ppEffectAdjust [8];   
+	"dynamicBlur" ppEffectCommit 0;     
+	"dynamicBlur" ppEffectAdjust [0.0];  
+	"dynamicBlur" ppEffectCommit 1.5;  
+	sleep 1.5;
+	"dynamicBlur" ppEffectEnable false; 
+};
+
+// shake
+[] spawn {
+	addCamShake [55, 5, 21];
+	enableCamShake false;
+	sleep 1;
+	enableCamShake true;
+	addCamShake [15, 5, 21];
+	enableCamShake false;
+};

+ 27 - 0
addons - Copy/RD501_Zeus/functions/fn_ragdollUnit.sqf

@@ -0,0 +1,27 @@
+/*
+	Author: Killzone_Kid
+
+	Description:
+		Forces the unit into ragdoll. Should be executed where unit is local.
+
+	Parameters:
+		0: OBJECT - Unit being forced into ragdoll.
+		
+	Returns:
+		NONE
+*/
+
+params ["_unit"];
+
+if (vehicle _unit != _unit) exitWith {};
+private "_rag";
+_rag = "Land_Can_V3_F" createVehicleLocal [0,0,0];
+_rag setMass 1e10;
+_rag attachTo [_unit, [0,0,0], "Spine3"];
+_rag setVelocity [0,0,6];
+_unit allowDamage false;
+detach _rag;
+[_rag, _unit] spawn {
+	deleteVehicle (_this#0);
+	(_this#1) allowDamage true;
+};

+ 45 - 0
addons - Copy/RD501_Zeus/functions/fn_rayParticles.sqf

@@ -0,0 +1,45 @@
+/*
+	Author: TheTimidShade
+
+	Description:
+		Creates particles for main laser beam. Executed internally from tts_beam_fnc_beam.
+
+	Parameters:
+		0: OBJECT - Beam emitter object passed from fnc_beam.
+		1: ARRAY - Colour of laser passed from fnc_beam.
+		2: ARRAY - Position of target object passed from fnc_beam.
+		
+	Returns:
+		NONE
+*/
+
+params ["_beamEmitter", "_col", "_targetPos"];
+
+_ray = "#particlesource" createVehicleLocal (getpos _beamEmitter);
+_ray setParticleCircle [0, [0, 0, -3]];
+_ray setParticleRandom [0, [0.25, 0.25, 0], [0.175, 0.175, 0], 0, 0.25, [0, 0, 0, 0.1], 0, 0];
+_ray setParticleParams [["\A3\data_f\cl_exp", 1, 0, 1], "", "Billboard", 1, 3, [0, 0, 0], [0, 0, 0], 13, 10, 7.6, 0, [15,11,7,3], [[_col#0, _col#1, _col#2, 1]], [0.08], 1, 0, "", "", _ray];
+_ray setDropInterval 0.0025;
+_ray attachTo [_beamEmitter, [0,0,0]];
+
+// lights
+_lights = "#particlesource" createVehicleLocal (getpos _beamEmitter);
+_lights setParticleCircle [0, [0, 0, -3]];
+_lights setParticleRandom [0, [0.25, 0.25, 0], [0.175, 0.175, 0], 0, 0.25, [0, 0, 0, 0.1], 0, 0];
+_lights setParticleParams [["\A3\data_f\VolumeLight", 1, 0, 1], "", "SpaceObject", 1, 3, [0, 0, 0], [0, 0, 0], 0, 10, 7.6, 0, [8,6,3,1], [[_col#0, _col#1, _col#2, 1]], [0.08], 1, 0, "", "", _lights];
+_lights setDropInterval 0.002;
+_lights attachTo [_beamEmitter, [0,0,0]];
+
+// lightpoint
+_lightp = "#lightpoint" createVehicleLocal (getpos _beamEmitter);
+_lightp setLightBrightness 80;
+_lightp setLightAmbient _col;
+_lightp setLightColor _col;
+_lightp lightAttachObject [_beamEmitter, [20,20,200]];
+
+sleep 1; // sleep to let beamEmitter accelerate first
+waitUntil {sleep 0.01; vectorMagnitude (velocity _beamEmitter) < 20 || _beamEmitter distance _targetPos < 5 || (getPosATL _beamEmitter)#2 < 5};
+
+sleep 0.1; // small sleep to let dust cloud get created to hide deletion of beam
+
+{deleteVehicle _x} forEach [_ray, _lights, _lightp];

BIN
addons - Copy/RD501_Zeus/sounds/laser.ogg


BIN
addons - Copy/RD501_Zeus/sounds/laser_impact.ogg


BIN
addons - Copy/RD501_Zeus/ui/explosion_zeus_icon_small.paa