pierremgi 4738 Posted November 18, 2017 Little script to throw away the helmet of a unit when hit by a bullet (in init field of the unit) this addEventHandler ["handledamage", { params ["_unit","_part","_dam","_shooter"]; if (_part == "head" && _dam > 0.4 && headgear _unit != "" && local _unit) exitWith { _h = headgear _unit; removeHeadgear _unit; _g = goggles _unit; removeGoggles _unit; _nv = ((assignedItems _unit) select {_x find "NV" > -1}) select 0; _unit unlinkItem _nv; _w = createVehicle ["WeaponHolderSimulated",ASLtoATL eyePos _unit, [], 0, "CAN_COLLIDE"]; _w addItemCargoGlobal [_h,1]; _w addItemCargoGlobal [_g,1]; _w addItemCargoGlobal [_nv,1]; _w setVelocity [5 * sin (_shooter getdir _unit), 5 * cos (_shooter getDir _unit), 0.3]; _w addTorque [random 0.02, random .02, random .02]; 0 } }]; 1 1 Share this post Link to post Share on other sites
cosmic10r 2324 Posted November 18, 2017 It can be fun... Ive fiddled with it with headgore... were you able to keep the helmet on the ground once it spawned? In some cases the helmet rolls well but in others it sits above the ground... 3 Share this post Link to post Share on other sites
pierremgi 4738 Posted November 18, 2017 14 hours ago, cosmic10r said: In some cases the helmet rolls well but in others it sits above the ground... Probably due to the addTorque command. If stronger parameters, the weaponholder is stuck in mid air. Share this post Link to post Share on other sites