ACE3/addons/explosives/functions/fnc_onIncapacitated.sqf

28 lines
534 B
Plaintext
Raw Normal View History

/*
* Author: Garth 'L-H' de Wet
* Detonates all attached deadman's switched triggered explosives.
*
* Arguments:
* 0: Unit <OBJECT>
*
* Return Value:
* None
*
* Example:
* Handled by CBA
*
* Public: No
*/
#include "script_component.hpp"
2015-07-18 05:36:47 +00:00
2015-08-15 19:35:33 +00:00
//NOTE: Extended_Killed_EventHandlers runs only where _unit is local
params ["_unit"];
TRACE_1("params",_unit);
2015-07-18 05:36:47 +00:00
private ["_deadman"];
2015-07-18 05:36:47 +00:00
_deadman = [_unit, "DeadManSwitch"] call FUNC(getPlacedExplosives);
{
[_unit, -1, _x, true] call FUNC(detonateExplosive);
2015-08-15 19:35:33 +00:00
} forEach _deadman;