ACE3/addons/explosives/functions/fnc_startTimer.sqf

27 lines
580 B
Plaintext
Raw Normal View History

/*
2015-01-15 20:06:38 +00:00
Author(s):
Garth de Wet (LH)
2015-01-15 20:06:38 +00:00
Description:
Starts a timer for an explosive.
2015-01-15 20:06:38 +00:00
Parameters:
0: OBJECT - Explosive
1: NUMBER - time till detonation
2015-01-15 20:06:38 +00:00
Returns:
Nothing
2015-01-15 20:06:38 +00:00
Example:
[_explosive, 10] call ACE_Explosives_fnc_startTimer;
*/
#include "script_component.hpp"
2015-01-17 16:45:56 +00:00
EXPLODE_2_PVT(_this,_explosive,_delay);
2015-01-15 20:06:38 +00:00
[{
_explosive = _this;
2015-01-15 20:06:38 +00:00
if (!isNull _explosive) then {
[_explosive, -1, [_explosive, 0], true] call FUNC(detonateExplosive);
};
}, _explosive, _delay, 0] call EFUNC(common,waitAndExecute);