Ambient Effects - Theseus-Aegis/MissionTemplate GitHub Wiki
This page will explain the usage of the Ambient Effects function.
/*
* Author: Mike
* Destroys the vehicle (without effects) and adds a fire effect to it. Optionally allows deletion after a set time, if time isn't set it is not deleted.
* Effect types are 0 - Fire, 1 - Smoke and 2 - Bubbles (Only in water).
* Call from initServer.sqf.
*
* Arguments:
* 0: Vehicle <OBJECT>
* 1: Destroy Vehicle <BOOL> (default: true)
* 2: Effect Type <NUMBER> (default: 0)
* 3: Time until deletion <NUMBER> (default: 0)
* 4: Attachment Offset <POSITION> (default: [0, 0, 0])
*
* Return Value:
* None
*
* Example:
* [MyVehicle] call MFUNC(ambientEffects);
*/This function is used to create either Fire, Smoke or Bubble effects. (Bubbles obviously only work underwater).
It has parameters for destroying whatever object it's attached to like a vehicle, automatically deleting itself after X time has passed and giving it an offset of where it's attached to.
Called from initServer.sqf
Example (Vehicle is smoking, but not destroyed):
[MyVehicle, false, 1] call MFUNC(ambientEffects);Advanced Example (Vehicle is destroyed and on fire for 60 seconds, fire is higher up on the vehicle):
[MyVehicle, true, 0, 60, [0, 3, 0]] call MFUNC(ambientEffects);