ACE3/addons/chemlights/functions/fnc_initIR.sqf
voiperr fedad7f8f7 Ace_Chemlights (Chemlight Enhancements) (#3921)
* Add ace_chemlights.
Make chemlight intensity and dropoff more realistic.
Add orange, white, IR chemlights.
Add chemlight shields.
Make chemlight impact sounds more realistic.

* Moved impact sound changes to a different branch.

* Used QPATHTOF. Fixed scopes. Used initServer. Reduced lifetime duration.
Checked privates.

* Stringtable: 5 minute.

* Blue lifetime. Removed ref to deprecated function

* Use proper magazine macro. Add new chemlights to Misc box.
2016-08-27 10:19:39 +02:00

32 lines
853 B
Plaintext

/*
* 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
*/
#include "script_component.hpp"
params ["_dummy"];
private _chemlightClass = getText (configFile >> "CfgVehicles" >> typeOf _dummy >> "ACE_Attachable");
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;