natunobilis 0 Posted March 3, 2023 I have this script, which works with any explosive near a wall, and when it explodes it disappears (wall). I would like this to only happen when the player uses an explosive DemoChage_F (Explosive Charge). wall01 addEventHandler ["Explosion", { wall01 hideObject true; }]; Can anyone help me with this? Share this post Link to post Share on other sites
Harzach 2517 Posted March 5, 2023 Version 2.10 added a new parameter to the Explosion EH which is helpful here: wall01 addEventHandler ["Explosion", { params ["_vehicle", "_damage", "_source"]; if ("c4_charge_small" in str _source) then { _vehicle hideObject true; }; }; Alternately, place this in the init of any object: this addEventHandler ["Explosion", { params ["_vehicle", "_damage", "_source"]; if ("c4_charge_small" in str _source) then { _vehicle hideObject true; }; }; Or, if you want to get fancy and have the wall sink into the ground then be deleted: this addEventHandler ["Explosion", { params ["_vehicle", "_damage", "_source"]; if ("c4_charge_small" in str _source) then { [_vehicle] spawn { params ["_vehicle"]; for "_i" from 0 to 250 do { _pos = getPosATL _vehicle; _vehicle setPosATL [_pos#0,_pos#1,(_pos#2 - 0.1)]; sleep 0.02; }; deleteVehicle _vehicle; }; }; }]; 1 Share this post Link to post Share on other sites