ACE3/addons/medical_damage/functions/fnc_woundsHandlerVehiclecrash.sqf
PabstMirror a3aef6a066
General - Cleanup spaces in macros (#9769)
Co-authored-by: LinkIsGrim <salluci.lovi@gmail.com>
2024-02-05 14:04:24 -03:00

29 lines
816 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: Pterolatypus
* Custom wound handler for vehicle crashes, sends damage to a random hitpoint
*
* Arguments:
* 0: Unit That Was Hit <OBJECT>
* 1: Damage done to each body part <ARRAY>
* 2: Type of the damage done <STRING>
*
* Return Value:
* None
*
* Example:
* [player, [[0.5, "#structural", 1.5]], "vehicleCrash"] call ace_medical_damage_fnc_woundsHandlerVehicleCrash
*
* Public: No
*/
params ["_unit", "_allDamages", "_typeOfDamage"];
TRACE_3("woundsHandlerVehicleCrash",_unit,_allDamages,_typeOfDamage);
// randomise all hit selections
private _newDamages = _allDamages apply {
[_x select 0, selectRandom ALL_BODY_PARTS, _x select 2];
};
TRACE_1("Vehicle crash handled, passing damage",_newDamages);
[_unit, _newDamages, _typeOfDamage] //return