ACE3/addons/grenades/functions/fnc_flare.sqf
johnb432 8fc093de8f
Grenades - Code cleanup (#9979)
* Improved various aspects of grenades

* Update addons/grenades/functions/fnc_flashbangExplosionEH.sqf

Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>

* Update addons/grenades/functions/fnc_incendiary.sqf

Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>

* Update addons/grenades/functions/fnc_incendiary.sqf

Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>

* Update fnc_flashbangExplosionEH.sqf

* More cleanup

* Update fnc_incendiary.sqf

* Update fnc_incendiary.sqf

* Update fnc_flashbangThrownFuze.sqf

* Update fnc_flashbangThrownFuze.sqf

* Update addons/grenades/functions/fnc_nextMode.sqf

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>

* Update addons/grenades/functions/fnc_flashbangExplosionEH.sqf

* Update addons/grenades/functions/fnc_incendiary.sqf

* Removed fix that is included in another PR

* Update fnc_incendiary.sqf

* Messed up merge conflict resolution

---------

Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>
Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
2024-06-18 01:05:01 -07:00

39 lines
857 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: commy2
* Makes flare shine.
*
* Arguments:
* 0: Flare <OBJECT>
* 1: Color of flare <ARRAY>
* 2: Intensity of flare <NUMBER>
* 3: Flare lifetime <OBJECT>
*
* Return Value:
* None
*
* Example:
* [_nade, [0.5,0.5,0.5], 0.5, 60] call ace_grenades_fnc_flare
*
* Public: No
*/
params ["_projectile", "_color", "_intensity", "_timeToLive"];
private _light = "#lightpoint" createVehicleLocal position _projectile;
_light setLightColor _color;
_light setLightAmbient _color;
_light setLightIntensity _intensity;
_light setLightBrightness 0.8;
_light setLightUseFlare true;
_light setLightFlareSize 3.0;
_light setLightFlareMaxDistance 1000;
_light setLightDayLight true;
_light lightAttachObject [_projectile, [0,0,0]];
[{deleteVehicle _this}, _light, _timeToLive] call CBA_fnc_waitAndExecute;