Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions addons/grenades/functions/fnc_flashbangExplosionEH.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ _affected = _affected - [ACE_player];
if (_flashReactionDebounce < CBA_missionTime) then {
// Not used interally but could be useful for other mods
_unit setVariable [QGVAR(flashStrength), _strength, true];
[QGVAR(flashbangedAI), [_unit, _strength, _grenadePosASL]] call CBA_fnc_localEvent;
{
_unit setSkill [_x, (_unit skill _x) / 50];
} forEach SUBSKILLS;
Expand Down Expand Up @@ -162,5 +163,7 @@ if (hasInterface && {!isNull ACE_player} && {alive ACE_player}) then {
private _maxFlinch = linearConversion [0.2, 1, _strength, 0, 95, true];
private _flinch = (_minFlinch + random (_maxFlinch - _minFlinch)) * selectRandom [-1, 1];
ACE_player setDir (getDir ACE_player + _flinch);

[QGVAR(flashbangedPlayer), [_strength, _grenadePosASL]] call CBA_fnc_localEvent;
};
true
10 changes: 10 additions & 0 deletions docs/wiki/framework/grenades-framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,13 @@ The average amount of time in seconds, after `explosionTime` has passed, between
### 2.4 ace_grenades_flashbangIntervalMaxDeviation

The amount of randomness in the fuse time.

## 3. Events

### 3.1 Listenable

Event Name | Description | Passed Parameter(s) | Locality
---------- | ----------- | ------------------- | --------
`ace_flashbangExploded` | A flashbang exploded | `[_grenadePosASL]` | Global
`ace_grenades_flashbangedAI` | A local AI was affected by a flashbang | `[_unit, _strength, _grenadePosASL]` | Local
`ace_grenades_flashbangedPlayer` | The local player was affected by a flashbang | `[_strength, _grenadePosASL]` | Local