2015-01-11 16:42:31 +00:00
|
|
|
/*
|
2015-01-12 09:48:26 +00:00
|
|
|
Name: ACE_Explosives_fnc_defuseExplosive
|
|
|
|
|
2015-01-11 16:42:31 +00:00
|
|
|
Author: Garth de Wet (LH)
|
2015-01-12 09:48:26 +00:00
|
|
|
|
2015-01-11 16:42:31 +00:00
|
|
|
Description:
|
|
|
|
Defuses an Explosive
|
2015-01-12 09:48:26 +00:00
|
|
|
|
|
|
|
Parameters:
|
2015-01-11 16:42:31 +00:00
|
|
|
0: OBJECT - unit
|
|
|
|
1: OBJECT - Explosive
|
2015-01-12 09:48:26 +00:00
|
|
|
|
2015-01-11 16:42:31 +00:00
|
|
|
Returns:
|
|
|
|
Nothing
|
2015-01-12 09:48:26 +00:00
|
|
|
|
2015-01-11 16:42:31 +00:00
|
|
|
Example:
|
2015-01-12 09:48:26 +00:00
|
|
|
[player, ACE_Interaction_Target] call ACE_Explosives_fnc_defuseExplosive;
|
2015-01-11 16:42:31 +00:00
|
|
|
*/
|
2015-01-12 17:11:43 +00:00
|
|
|
#include "\z\ace\explosives\script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
private ["_unit", "_explosive"];
|
|
|
|
_unit = _this select 0;
|
|
|
|
_explosive = _this select 1;
|
|
|
|
|
2015-01-12 09:48:26 +00:00
|
|
|
if (getNumber (ConfigFile >> "CfgAmmo" >> typeof _explosive >> "ACE_explodeOnDefuse") == 1) exitWith {
|
|
|
|
[_unit, -1, [_explosive, 1], true] call FUNC(detonateExplosive);
|
2015-01-11 16:42:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
_unit action ["Deactivate", _unit, _explosive];
|