Skip to content

Contamination Gas

Mike-MF edited this page Nov 20, 2023 · 3 revisions

This page will explain the usage of the Contamination Gas function.


/*
 * Author: Mike
 * Adds contamination gas within a marker radius.
 * Array returned can be used to clear the gas.
 * Cloud Size cannot be greater than 3.
 *
 * Call from initPlayerLocal.sqf.
 *
 * Arguments:
 * 0: Marker <STRING>
 * 1: Colour RGBA <ARRAY> (default: [1, 1, 0, 0.04])
 * 2: Gas cloud size <NUMBER> (default: 1)
 *
 * Return Value:
 * Particle Emitters <ARRAY>
 *
 * Example:
 * ["MyMarker"] call MFUNC(contaminationGas)
 * GVAR(gasOne) = ["MyMarker", [1, 1, 1, 0.04]] call MFUNC(contaminationGas)
 */

Usage

This function adds gas to a pre-defined area, the gas colour can be altered from its default orange by using the second argument for RGBA colour. Changing the alpha from 0.04 is absolutely not recommended.

The gas cloud size is self-explanatory however it is limited to 3 for performance and sanity reasons.

This function returns an array of particle emitters locally on each machine, for example:

tac_gas = ["MyMarker", [1, 1, 1, 0.04]] call MFUNC(contaminationGas);

And to delete them you must globally execute;

{
    deleteVehicle _x;
} forEach tac_gas;

This works well in addition to Respirator Effects.

Call from initPlayerLocal.sqf

Example:

["MyMarker"] call MFUNC(contaminationGas);
Clone this wiki locally