Skip to content

Instantly share code, notes, and snippets.

@M3ales
Created October 16, 2021 12:30
Show Gist options
  • Save M3ales/04570dfba64b252ec52ed721c12ef860 to your computer and use it in GitHub Desktop.
Save M3ales/04570dfba64b252ec52ed721c12ef860 to your computer and use it in GitHub Desktop.
_fnc_damageTarget = {
params["_target", "_numberOfWounds"];
private _parts = ["Head", "Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg"];
for [{private _i = 0}, {_i < _numberOfWounds}, {_i = _i + 1}] do {
[_target, 1, selectRandom _parts, "bullet"] call ace_medical_fnc_addDamageToUnit;
};
};
private _vehicle = vehicle player;
{
if((driver _vehicle != _x) && _x != player) then {
[_x, 5] call _fnc_damageTarget;
};
} forEach(crew _vehicle);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment