trigger trap to destroy base object

should fix issue reported in #945
This commit is contained in:
vbawol 2017-10-25 20:53:11 -05:00
parent 5c3d7a1a74
commit f579588c00
2 changed files with 2 additions and 0 deletions

View File

@ -108,6 +108,7 @@ for "_i" from 0 to _this do {
_ammoObj setVectorDirAndUp _worldspace;
_ammoObj setposATL _location;
_baseObj setVariable ["EPOCH_TRAP_OBJ",_ammoObj];
_baseObj addEventHandler ["Explosion", {(_this select 0) setDamage 1}];
};
// set persistent Animations

View File

@ -58,6 +58,7 @@ if (_objSlot != -1) then {
_ammoObj = createVehicle [_ammoClass, [0,0,0], [], 0, "CAN_COLLIDE"];
_ammoObj attachTo [_newObj,[0,0,0]];
_newObj setVariable ["EPOCH_TRAP_OBJ",_ammoObj];
_newObj addEventHandler ["Explosion", {(_this select 0) setDamage 1}];
};
_newObj setDamage _damage;