← Go back

Arma Smoke and Chemlight dropper function


Posted on September 30, 2018 at 15:57 (GMT +00:00) by Colin

Just a quick post today, a function to help my friend Rick out, thought I might as-well post it for others to use.

PX_fnc_dropEventSmoke = {	
	_this spawn {
		params ["_side", "_pos", "_height"];
		private ["_smoke", "_chem"];
		if (_side == WEST) then {
			_chem = "Chemlight_blue";
			_smoke = "SmokeShellBlue";
		} else {
			if (_side == EAST) then {
				_chem = "Chemlight_red";
				_smoke = "SmokeShellRed";
			} else {
				_chem = "Chemlight_green";
				_smoke = "SmokeShellGreen";				
			};
		};
		
		private _obj = createVehicle [_chem, (_pos vectorAdd [0,0,_height]), [], 0, ""];
		sleep 1;
		_obj = createVehicle [_smoke, (_pos vectorAdd [0,0,_height]), [], 0, ""];						
	};
};


Place this function inside of your init.sqf or in another file of your choice. Next, when you want smoke to be dropped (with a chem), for the event you just need to call this function.

Let's say you want to drop smoke over a captured AO or Tower, make sure you have your tower object as a variable. Then call the function like so:

[WEST, getPos AO, 1000] call PX_fnc_dropEventSmoke;


This will drop blue chem and smoke over the AO at 1000m, need help? Drop me a comment.

/signing off
/Scripting

Search
Tags
Accident Adoption Albums Algorithms Altcoins Animal Rescue AnL Aquarium Arma ArmA nd Leg Array Partitioning Arrays Assembler Assembly Atanasovsko Award Bazaar Binary Search Bitcoin Bohemia Bootstrap Bulgaria Bulgaria Za Mladite Burgas C C++ Celerity Charity Chemical Records Chemical Shock Chemlight Code Competition Compiler Contest Converter Covid-19 CPP Crypto Cryptocurrency css Data Recovery Database DataTables Decode Dedicated Dedicated Server Delphi Development Dialogs Divide & Conquer DIY DnB Drum & Bass Earplugs Event Exchange Eyes Fish Floating-point Flood Fog Freeware Function Funny Gallery Game Game Development Game Modding Gaming Garden Gardening Gazebo GERB GitHub Glitch Hamish Harding Happy New Year Heapify HeapSort Helga HTML HTML entities Introduction Jackie JavaScript JQuery Jungle Lake Language Linker Listbox ListNBox lnbSetTooltip MariaDB Maths Merry Christmas Mini Mining Miningpoolhub Mist Modding MPH Multiplayer Music MySql NGO OceanGate One Nature ORCA organisation OverHertz Paludarium Pandemic Pascal Paul-Henri Nargeolet Paws Furever Pergola Persistence Pets Photography Pier Plugin Programming progress bar Project PX Library Quicksort r53 Racing Replace Scripting Searching Server Shahzada Dawood Simulation Simulator Smoke Snippet Social media Software Sorting Source Sourcecode SQF Statistics Stockton Rush String Strings Submarine Suleman Dawood Terrain Detail Text Titan Tool Tragedy tutorial UCS4Char UE4 Unreal Engine Victims View Distance ViewBug web Web Development Website Welcome Woodworking Ziron Zynk