2015-01-11 16:42:31 +00:00
|
|
|
/*
|
2015-02-02 08:35:17 +00:00
|
|
|
* Author: Garth 'L-H' de Wet
|
|
|
|
* Starts a timer for an explosive.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Explosive <OBJECT>
|
|
|
|
* 1: Time till detonate <NUMBER>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [_explosive, 10] call ACE_Explosives_fnc_startTimer;
|
|
|
|
*
|
|
|
|
* Public: Yes
|
|
|
|
*/
|
2015-01-13 21:21:31 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-17 05:14:09 +00:00
|
|
|
|
2015-08-15 19:35:33 +00:00
|
|
|
params ["_explosive", "_delay"];
|
|
|
|
TRACE_2("params",_explosive,_delay);
|
2015-01-15 20:06:38 +00:00
|
|
|
|
2015-01-17 06:09:51 +00:00
|
|
|
[{
|
2015-08-15 19:35:33 +00:00
|
|
|
params ["_explosive"];
|
|
|
|
TRACE_1("Explosive Going Boom",_explosive);
|
2015-01-15 20:06:38 +00:00
|
|
|
if (!isNull _explosive) then {
|
2015-04-01 18:43:18 +00:00
|
|
|
[_explosive, -1, [_explosive, 0]] call FUNC(detonateExplosive);
|
2015-01-15 20:06:38 +00:00
|
|
|
};
|
2015-08-15 19:35:33 +00:00
|
|
|
}, [_explosive], _delay] call EFUNC(common,waitAndExecute);
|