mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
73a7dbdc1e
- Add stackable wound handler system for easy 3rd party extensibility and overriding of default wound handler. - Change mapping from wound type -> damage types, to damage type -> wound types. Improves the semantics and makes configuration easier to reason about. - Allow damage types to influence wound properties (bleed, size, etc.) with configurable variance parameters. - Allow configuration of wound type variance per damage type. Enabling more logically driven variance for sensible but still varied end results. - Improve handling of non-selection-specific damage events. The wound handler now receives all incoming damages and may apply damage to multiple selections (previously only ever one) if the damage type is not configured to be selection specific (with new config property `selectionSpecific`). - Add debug script for testing explosion damage events at varied ranges. - Add custom fire wound handler.
28 lines
744 B
Plaintext
28 lines
744 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"];
|
|
|
|
// 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
|