Events
Events are called periodically by the BAC and may also be called by the user, either via network calls or other events. Each event triggers a series of up to 5 Actions with respective Options. These Actions can be used to set outputs / relays, send network requests, configure serial LEDs, and more. For details on event types see the tables below, for details on Action types see the Actions section.
Main
Events |
Description |
Called
By |
Init |
Initialization event, called on device powerup. Can be used to enable or disable BAC on start. |
Automatic:
BAC startup Manual:
Network call Manual: Other events |
Reset
|
Resets game state |
Automatic: BAC
startup (after init) Automatic: Per game Manual: Network
call Manual: Other events |
Solve |
Called when prop is solved. |
Automatic:
Per game Manual:
Network call Manual: Other events |
Unsolve |
Called when prop is taken out of a solved state after being solved, useful for autoreset. |
Automatic: Per
game Manual: Network
call Manual: Other events |
Fail |
Called when an input sequence is incorrect. Game specific. |
Automatic:
Per game Manual:
Network call Manual: Other events |
Hit |
Called when an incremental user action is correct. |
Automatic: Per
game Manual: Network
call Manual: Other events |
Miss |
Called when an incremental user action is incorrect. |
Automatic:
Per game Manual:
Network call Manual: Other events |
Enable |
Enables prop (runs game logic). Useful for sequencing props. |
Automatic: On BAC
startup Manual: Network
call Manual: Other events |
Disable |
Disables prop (stops game logic). Useful for sequencing props. |
Manual:
Network call Manual: Other events |
Input Events |
Description |
Called By |
Input[0-7] |
Per input events. Can be disabled or set to trigger on low or
high. Can also be set to trigger once per reset (useful for room controller
mode). Will only trigger on state change (i.e. if set to trigger on high,
will only trigger when input state goes from low to high). |
Automatic: When input matches configured options Manual: Network call Manual: Other events |
Custom Events |
Description |
Called By |
Custom[0-7] |
User events, useful for extending events that require more than 5
actions, also useful for calling from escape room control software like M3 to
provide extra functionality. |
Manual: As configured for RFID nonsequential mode. Manual: Network call Manual: Other events |
Event Actions
Event actions are triggered when their respective event is called. Each action has corresponding Options. For information on Option syntax and examples see table below.
Action |
Option |
Example 1 |
Example 1 Comment |
Example 2 |
Example 2 Comment |
Turn On Output |
Comma separated value, 0-5 |
0, 1, 2, 3, 4, 5 |
Turns on all outputs |
0, 1 |
Turns on outputs 0 and 1 |
Turn
Off Output |
Comma
separated value, 0-5 |
0,
1, 2, 3, 4, 5 |
Turns
off all outputs |
4,
5 |
Turns
off outputs 4 and 5 |
Turn On Relay |
Comma separated value, 0-1 |
0, 1 |
Turn on both relays |
0 |
Turn on relay 0 |
Turn
Off Relay |
Comma
separated value, 0-1 |
0,
1 |
Turn
off both relays |
1 |
Turn
off relay 1 |
Play Sprite Video |
Index of video file, 0-254 |
0 |
Plays video index 0 |
1 |
Plays video index 1 |
Loop
Sprite Video |
Index
of video file 0-254 |
0 |
Loops
video index 0 |
1 |
Loops
video index 1 |
Play Sound |
Filename |
Sound.mp3 |
Plays an mp3 called “Sound.mp3” |
Background.mp3 |
Plays an mp3 called “background.mp3” |
Loop
Sound |
Filename |
Sound.mp3 |
Loops
an mp3 called “Sound.mp3” |
Background.mp3 |
Loops
an mp3 called “background.mp3” |
Stop Sounds |
None |
|
|
|
|
Call
Event |
Event
name. Event names are given under each event. |
reset |
Calls
reset event |
solve |
Calls
solve event |
Clear Events |
None Clears all pending events. Useful for clearing events that call
each other in a loop (i.e. event0 calls event1 calls event2 calls event0). |
|
|
|
|
Set
Neopixels |
Index
of strip on output (1-5 only) and rgb values 0-255.
Format is index.red.green.blue |
5.255.0.0 |
Sets
neopixels on output 5 to full red |
1.255.255.255 |
Sets
neopixels on output 1 to white |
Set Rfid Output |
Sets onboard relay of FX200 (special versions only) at the
specified index on (1) or off (0). Format is index.value |
0.1 |
Turns the relay of the 0th fx200 to on |
8.0 |
Turns the relay of the 8th fx200 to off |
Network
Call |
Sends
custom network request with optional payload. MQTT, M3, HMC, and ERM only.
Format takes the form string or string.payload |
specialEvent |
Sends
request /BACName/get/specialEvent |
specialEvent.True |
Sends
request /BACName/get/specialEvent With a payload of True |
Wait |
Wait time in milliseconds before the rest of the actions in the
event are called. 1000 milliseconds = 1 second |
500 |
Delays further actions in this event by half a second |
10000 |
Delays further actions in this event by 10 seconds. |