iV - Ghost 50 Posted August 18, 2018 I have added a "HitPart" eventHandler on my building (selection: doors) for breaching with a claymore. But the eventHandler don't detected my explosives. If I shoot on the door it detects the hitValue and the ammoClass (No indirectValue, indirectValueRange or explosiveDamage) but not with explosives. I'm playing with ACE3 but I don't know if it is important for that. I'm trying with ied, charge, claymore but no detection. The granades (40mm and M67) works too. This is the function who is called by the eventHandler: // VARIABLES (_this select 0) params ["_target", "_shooter", "_projectile", "_position", "_velocity", "_selection", "_ammo", "_vector", "_radius", "_surfaceType", "_isDirect"]; private _selectedPart =_selection select 0; private _debug = true; private _substr = toArray (_selectedPart); _substr resize 5; _substr = toLower (toString _substr); // CHECK IF IS DOOR if (_substr == "door_") then { private _hitValue = _ammo select 0; // Hit value private _indirectHitValue = _ammo select 1; // Indirect hit value private _hitRange = _ammo select 2; // Indirect hit range private _explosiveDamage = _ammo select 3; // Explosive damage private _ammoClass = _ammo select 4; // Ammo class name // SHOW HIT VALUE if (_debug) then { hint format [ "_hitValue = %1 \n _indirectHitValue = %2 \n _hitRange = %3 \n _explosiveDamage = %4 \n _ammoClass = %5", _hitValue, _indirectHitValue, _hitRange, _explosiveDamage, _ammoClass ]; }; // IF DOOR HITS DIRECTLY if (_isDirect) then { private _animate = format ["%1_rot", _selectedPart]; private _var = format ["bis_disabled_%1", _selectedPart]; private _phase = _target animationPhase _animate; // OPEN DOOR COMPLETE if (_hitValue > 30) exitWith { _target animate [_animate, 1]; _target setVariable [_var, 1, true]; }; // OPEN DOOR ONLY A BIT if (_hitValue > 21 && {_hitValue <= 30}) exitWith { _target animate [_animate, _phase + 0.2]; _target setVariable [_var, 0, true]; }; }; }; Share this post Link to post Share on other sites
gc8 981 Posted August 18, 2018 Have you tried with Explosion EH ? Share this post Link to post Share on other sites
iV - Ghost 50 Posted August 18, 2018 No I haven't because he has no selection for my doors. Share this post Link to post Share on other sites
gc8 981 Posted August 18, 2018 I don't know if its possible to get door locations somehow? If you could get those you could check if the explosion was near some door? Share this post Link to post Share on other sites
iV - Ghost 50 Posted August 18, 2018 But HitPart should work if I reading the description. Can't understand why not. Share this post Link to post Share on other sites
gc8 981 Posted August 18, 2018 It says this in the hitpart wiki: "Additionally, if the unit gets damaged by any means other than shooter's shooting, "HitPart" will not fire." Share this post Link to post Share on other sites
iV - Ghost 50 Posted August 18, 2018 But why my handgranades working? And why "...In case of explosives that were planted by someone (e.g. satchel charges)... ."? Share this post Link to post Share on other sites