2015-06-10 20:29:33 +00:00
|
|
|
/*
|
|
|
|
* Author: Ruthberg
|
|
|
|
*
|
|
|
|
* Handles wire damage
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: wire <OBJECT>
|
|
|
|
* 1: selectionName <STRING>
|
|
|
|
* 2: damage <NUMBER>
|
|
|
|
* 3: source <OBJECT>
|
|
|
|
* 4: projectile <STRING>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
2015-08-09 00:19:34 +00:00
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Example:
|
|
|
|
* [wire, "selection", 5, source, "scrap"] call ace_concertina_wire_fnc_handleDamage
|
|
|
|
*
|
2015-08-09 00:19:34 +00:00
|
|
|
* Public: No
|
2015-06-10 20:29:33 +00:00
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
2015-08-09 00:19:34 +00:00
|
|
|
params ["_wire", "", "_damage", "_source", ""];
|
2015-06-10 20:29:33 +00:00
|
|
|
if (_damage < 0.5) exitWith { 0 };
|
|
|
|
|
|
|
|
if (!(isNull _source)) then {
|
|
|
|
_wire setVariable [QGVAR(lastDamager), _source];
|
|
|
|
};
|
|
|
|
|
|
|
|
_damage
|