diff --git a/addons/fire/XEH_postInit.sqf b/addons/fire/XEH_postInit.sqf index 382c06293b..ec40646ca9 100644 --- a/addons/fire/XEH_postInit.sqf +++ b/addons/fire/XEH_postInit.sqf @@ -3,8 +3,8 @@ [QGVAR(burn), FUNC(burn)] call CBA_fnc_addEventHandler; [QGVAR(playScream), { params ["_scream", "_source"]; - // only play sound if enabled in settings - if (GVAR(enableScreams)) then { + // only play sound if enabled in settings and enabled for the unit + if (GVAR(enableScreams) && {_source getVariable [QGVAR(enableScreams), true]}) then { _source say3D _scream; }; }] call CBA_fnc_addEventHandler; @@ -35,4 +35,3 @@ GVAR(fireSources) = [[], nil] call CBA_fnc_hashCreate; }; }] call CBA_fnc_addEventHandler; - diff --git a/docs/wiki/framework/fire-framework.md b/docs/wiki/framework/fire-framework.md index 2236c5a1c8..4f9ecdfdd3 100644 --- a/docs/wiki/framework/fire-framework.md +++ b/docs/wiki/framework/fire-framework.md @@ -37,3 +37,12 @@ Use `CBA_fnc_serverEvent` to use the following features. Events are defined only | Arguments | Type | Optional (default value) ---| --------- | ---- | ------------------------ 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]; +```