2017-06-08 13:31:51 +00:00
|
|
|
/*
|
|
|
|
* Author: commy2
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Unit <OBJECT>
|
|
|
|
* 1: New Damage <SCALAR>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [bob, 2] call ACE_medical_fnc_handleCollisionDamage
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
2015-10-02 21:19:14 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
params ["_unit", "_newDamage"];
|
|
|
|
|
2017-10-10 14:39:59 +00:00
|
|
|
private _selection = "body";
|
2015-10-02 21:19:14 +00:00
|
|
|
|
2017-10-10 14:39:59 +00:00
|
|
|
private _totalDamage = (_unit getHit _selection) + _newDamage;
|
2015-10-02 21:19:14 +00:00
|
|
|
|
|
|
|
_unit setHit [_selection, _totalDamage];
|
|
|
|
|
|
|
|
systemChat format ["collision: %1", _this];
|