-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
17 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
// Allows Zeus to detonate the IED by setting its HP to 0 (done by way of a trigger) | ||
// In so doing, also prevents the object from taking damage (so that stray bullets don't detonate it!) | ||
|
||
#include "macros.hpp" | ||
params ["_object", "_isLarge"]; | ||
SERVER_ONLY; | ||
_object allowDamage false; | ||
_object setVariable ["isLargeIED", _isLarge]; | ||
_object addEventHandler ["Killed", { | ||
params ["_unit", "_killer"]; | ||
[_unit, _unit getVariable ["isLargeIED", false]] call f_fnc_iedBoom; | ||
}]; | ||
private _trg = createTrigger ["EmptyDetector", getPos _object]; | ||
_trg setVariable ["iedObj", _object]; | ||
private _onAct = "private _obj = thisTrigger getVariable ""iedObj""; [_obj, _obj getVariable ""isLargeIED""] call f_fnc_iedBoom;"; | ||
private _cond = "private _obj = thisTrigger getVariable ""iedObj""; damage _obj >= 1;"; | ||
_trg setTriggerStatements [_cond, _onAct, ""]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters