add 2 new events, add unit to place event

defuse and explodeOnDefuse
This commit is contained in:
bux 2016-01-01 21:47:39 +01:00
parent 32b4416c29
commit 977bda83e5
2 changed files with 4 additions and 2 deletions

View File

@ -22,6 +22,8 @@ TRACE_2("params",_unit,_explosive);
if (GVAR(ExplodeOnDefuse) && {(random 1.0) < (getNumber (ConfigFile >> "CfgAmmo" >> typeOf _explosive >> "ACE_explodeOnDefuse"))}) exitWith { if (GVAR(ExplodeOnDefuse) && {(random 1.0) < (getNumber (ConfigFile >> "CfgAmmo" >> typeOf _explosive >> "ACE_explodeOnDefuse"))}) exitWith {
TRACE_1("exploding on defuse",_explosive); TRACE_1("exploding on defuse",_explosive);
[_unit, -1, [_explosive, 1], true] call FUNC(detonateExplosive); [_unit, -1, [_explosive, 1], true] call FUNC(detonateExplosive);
[QGVAR(explodeOnDefuse), [_explosive, _unit]] call EFUNC(common,globalEvent);
}; };
_unit action ["Deactivate", _unit, _explosive]; _unit action ["Deactivate", _unit, _explosive];
[QGVAR(defuse), [_explosive, _unit]] call EFUNC(common,globalEvent);

View File

@ -94,7 +94,7 @@ if (isText(_triggerConfig >> "onPlace") && {[_unit,_explosive,_magazineClass,_tr
_pitch = getNumber (_magazineTrigger >> "pitch"); _pitch = getNumber (_magazineTrigger >> "pitch");
//Globaly set the position angle: //Globaly set the position and angle:
[QGVAR(place), [_explosive, _dir, _pitch]] call EFUNC(common,globalEvent); [QGVAR(place), [_explosive, _dir, _pitch, _unit]] call EFUNC(common,globalEvent);
_explosive _explosive