Hey, I want a gas canister to explode when they got 1 hit and tried your script but its not working.
I made a OnHitExplode.sqf and put it in the mission folder:
{
_x addEventHandler ["Hit",{
params ["_unit"];
_unit removeEventHandler ["Hit",_thisEventHandler];
_bomb = "APERSMine_Range_Ammo" createVehicle (_unit modelToWorld [0,0,0]);
_bomb setDamage 1;
}];
} forEach (allUnits select {alive _x AND side _x isEqualTo civilian});
and wrote in the gas canister init :
execVM "OnHitExplode.sqf";
and nothing happens when i shot it with my AK, there are no errors.