How do you listen to events defined in a Rive state machine from code?
I’ve set up custom events inside a Rive state machine (using event actions on state transitions), and I want to listen to those events from code so I can trigger external logic.
Context / Use case:
We’re building an interactive survey experience and using Rive for the UI flow. The survey structure is predefined in Rive, but:
Real survey data needs to be injected dynamically
User interactions (answers, next/submit actions, etc.) should be captured in code
Certain Rive events should notify the app when a state change or user action happen
What I’m trying to understand:
How can events defined inside the .riv file be accessed and listened to in code?
Any examples or patterns (especially for production use cases like forms or surveys) would be really helpful.
Thank you!