Action Block Fields
Action Block Fields
An actions { } block inside an event_handler can produce three distinct effects: emit an event, activate a logical signal, or award points. Each uses a different HCL keyword, and the three are not interchangeable.
Keywords
| Keyword | Effect |
|---|---|
emit | Injects a named event into the event handler layer. Downstream event_handler blocks that listen for this name will fire. |
fire_signal | Activates a named logical signal. The signal’s completion handlers, cascades, and dependent rules all run. |
points | Awards points to the active player’s score. |
emit and fire_signal look similar but behave differently: emit produces a plain event, while fire_signal runs the named signal through the signal processing layer (including any of its conditions and cascades).
Example
event_handler "combo_complete" {
when = shot.left_orbit.complete
actions {
fire_signal = "combo_jackpot"
emit = combo_scored
data = {
device = left_orbit
}
points = 25000
}
}
score "jackpot_rule" {
when = combo_jackpot.complete
points = 100000
}Score Block when
The score block uses when to declare which event or signal it listens for. This matches the same keyword used in event_handler blocks:
score "orbit_shot" {
when = shot.left_orbit.complete
points = 5000
}Migration Notes
Earlier versions used trigger = in both contexts. The action-block form is now fire_signal = and the score-block form is now when =. Neither trigger = form is accepted by the current parser — update existing configs before loading them.