Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
6 changes: 6 additions & 0 deletions addons/interaction/functions/fnc_openDoor.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ GVAR(doorTargetPhase) = _house animationPhase (_animations select 0);
GVAR(isOpeningDoor) = true;
GVAR(usedScrollWheel) = false;

// Raise local started opening event
[QGVAR(doorOpeningStarted), [_house, _door, _animations]] call CBA_fnc_localEvent;

[{
(_this select 0) params ["_house", "_animations", "_position", "_time", "_frame"];

Expand All @@ -75,6 +78,9 @@ GVAR(usedScrollWheel) = false;

{_house animate [_x, _phase]; false} count _animations;
};

// Raise local stopped opening event
[QGVAR(doorOpeningStopped)] call CBA_fnc_localEvent;
Comment thread
ilbinek marked this conversation as resolved.
Outdated
};

// check if player moved too far away
Expand Down
10 changes: 9 additions & 1 deletion docs/wiki/framework/events-framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,14 @@ MenuType: 0 = Interaction, 1 = Self Interaction
|---------- |------------|----------|------|-------------|
| `ace_medical_treatment_fullHealLocalMod` | [_patient] | Local | Listen | Called before a local unit is fully healed, mods can listen and apply their own healing logic

### 2.15 Interaction (`ace_interaction`)

| Event Key | Parameters | Locality | Type | Description |
|---------- |------------|----------|------|-------------|
|---------- |------------|----------|------|-------------|
| `ace_interaction_doorOpeningStarted` | [_house, _door, _animations] | Local | Listen | Called when local unit starts interacting with doors
| `ace_interaction_doorOpeningStopped` | [] | Local | Listen | Called when local unit stopps interacting with doors

## 3. Usage
Also Reference [CBA Events System](https://github.com/CBATeam/CBA_A3/wiki/Custom-Events-System){:target="_blank"} documentation.

Expand Down Expand Up @@ -263,4 +271,4 @@ Calls a globally synchronized event, which will also be run on JIP players unles

// Event called on another machine (tapping above target machine)
["ace_interact_tapShoulder", [arguments], [target]] call CBA_fnc_targetEvent;
```
```