2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2016-08-27 08:19:39 +00:00
|
|
|
/*
|
|
|
|
* Author: voiper
|
|
|
|
* Spawn IR marker for dummy IR physX object.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 1: Dummy IR physX <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [_object] call ace_chemlights_fnc_initIR;
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
params ["_dummy"];
|
|
|
|
|
2021-02-18 18:58:08 +00:00
|
|
|
private _chemlightClass = getText (configOf _dummy >> "ACE_Attachable");
|
2016-08-27 08:19:39 +00:00
|
|
|
private _config = configFile >> "CfgAmmo" >> _chemlightClass;
|
|
|
|
private _delay = getNumber (_config >> "explosionTime");
|
|
|
|
private _lifeTime = getNumber (_config >> "timeToLive");
|
|
|
|
|
|
|
|
[{
|
|
|
|
params ["_dummy", "_lifeTime"];
|
|
|
|
private _IRMarker = "ACE_Chemlight_IR_Marker" createVehicle [0,0,0];
|
|
|
|
_IRMarker attachTo [_dummy, [0,0,0]];
|
|
|
|
[FUNC(removeIR), [_dummy, _IRMarker], _lifeTime] call CBA_fnc_waitAndExecute;
|
|
|
|
}, [_dummy, _lifeTime], _delay] call CBA_fnc_waitAndExecute;
|