2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2021-10-26 12:09:45 +00:00
|
|
|
/*
|
2023-08-16 23:18:01 +00:00
|
|
|
* Author: tcvm, veteran29
|
2021-10-26 12:09:45 +00:00
|
|
|
* Handles burning reactions of an unit, like screaming or throwing the weapons away due to pain.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Unit <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
2024-06-22 18:07:36 +00:00
|
|
|
params ["_unit"];
|
2021-10-26 12:09:45 +00:00
|
|
|
|
|
|
|
if (
|
2024-06-22 18:07:36 +00:00
|
|
|
GVAR(dropWeapon) > 0 &&
|
|
|
|
{isNull objectParent _unit} &&
|
|
|
|
{(currentWeapon _unit) != ""} &&
|
|
|
|
{!isPlayer _unit || GVAR(dropWeapon) == 2}
|
2021-10-26 12:09:45 +00:00
|
|
|
) then {
|
2024-06-22 18:07:36 +00:00
|
|
|
_unit call EFUNC(common,throwWeapon);
|
2021-10-26 12:09:45 +00:00
|
|
|
};
|
|
|
|
|
2024-06-22 18:07:36 +00:00
|
|
|
[QGVAR(playScream), [format [QGVAR(scream_%1), floor (1 + random 15)], _unit]] call CBA_fnc_globalEvent;
|