mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fire - Add ability to disable screams for individual units (#9863)
* Disable screams for individual units * Update addons/fire/XEH_postInit.sqf * Changed wording Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * isGlobal instead of true Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> --------- Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
This commit is contained in:
parent
8c69bd25ea
commit
af3c95a5a6
@ -3,8 +3,8 @@
|
|||||||
[QGVAR(burn), FUNC(burn)] call CBA_fnc_addEventHandler;
|
[QGVAR(burn), FUNC(burn)] call CBA_fnc_addEventHandler;
|
||||||
[QGVAR(playScream), {
|
[QGVAR(playScream), {
|
||||||
params ["_scream", "_source"];
|
params ["_scream", "_source"];
|
||||||
// only play sound if enabled in settings
|
// only play sound if enabled in settings and enabled for the unit
|
||||||
if (GVAR(enableScreams)) then {
|
if (GVAR(enableScreams) && {_source getVariable [QGVAR(enableScreams), true]}) then {
|
||||||
_source say3D _scream;
|
_source say3D _scream;
|
||||||
};
|
};
|
||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
@ -35,4 +35,3 @@
|
|||||||
GVAR(fireSources) = [[], nil] call CBA_fnc_hashCreate;
|
GVAR(fireSources) = [[], nil] call CBA_fnc_hashCreate;
|
||||||
};
|
};
|
||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
|
@ -37,3 +37,12 @@ Use `CBA_fnc_serverEvent` to use the following features. Events are defined only
|
|||||||
| Arguments | Type | Optional (default value)
|
| Arguments | Type | Optional (default value)
|
||||||
---| --------- | ---- | ------------------------
|
---| --------- | ---- | ------------------------
|
||||||
0 | Fire source ID | Any | Required
|
0 | Fire source ID | Any | Required
|
||||||
|
|
||||||
|
|
||||||
|
## 2. Variables
|
||||||
|
|
||||||
|
Screams can be disabled for an individual unit by setting the `ace_fire_enableScreams` variable on the unit, which can be synced across machines.
|
||||||
|
|
||||||
|
```sqf
|
||||||
|
_unit setVariable ["ace_fire_enableScreams", false, _isGlobal];
|
||||||
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user