mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
08dff76593
* Fix casing of stringtable keys * Use CBA_fnc_addSetting * Move burn reactions to function, add setting for weapon throwing * Fix stringtable keys in settings * Use stringtable entries from common component * Update addons/fire/stringtable.xml Co-authored-by: mharis001 <34453221+mharis001@users.noreply.github.com> * Update addons/fire/stringtable.xml Co-authored-by: mharis001 <34453221+mharis001@users.noreply.github.com> Co-authored-by: mharis001 <34453221+mharis001@users.noreply.github.com>
28 lines
645 B
Plaintext
28 lines
645 B
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: Brandon (TCVM), veteran29
|
|
* 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
|
|
*/
|
|
|
|
params ["_unit"];
|
|
|
|
if (
|
|
GVAR(dropWeapon) > 0
|
|
&& {_unit in _unit && { !(currentWeapon _unit isEqualTo "") }}
|
|
&& {!isPlayer _unit || GVAR(dropWeapon >= 2)}
|
|
) then {
|
|
[_unit] call EFUNC(hitreactions,throwWeapon);
|
|
};
|
|
|
|
private _soundID = floor (1 + random 15);
|
|
private _sound = format [QGVAR(scream_%1), _soundID];
|
|
[QGVAR(playScream), [_sound, _unit]] call CBA_fnc_globalEvent;
|