State Events
Estimated reading time: 2 minutesThe StateEvents module is part of the dynamic management system. It handles game state-triggered events. The framework automatically checks and triggers events at passage start and end.
Access via maplebirch.dynamic.State or shortcut maplebirchFrameworks.addStateEvent().
Core API
regStateEvent(type, eventId, options)
Register a new state event.
- @param
type(string): Event type,'interrupt'or'overlay' - @param
eventId(string): Unique event identifier - @param
options(StateEventOptions): Event configuration - @return
boolean: Whether registration succeeded
delStateEvent(type, eventId)
Unregister a state event.
trigger(type)
Trigger state events manually:
