makspll / makspll/bevy_mod_scripting
Triggering callbacks from within BMS scripts
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Rust
- Stars
- 649
- Forks
- 59
- PR merge metrics
- No merged PRs in 30d
Description
Request
Provide an API similar to this:
trigger_event("EventHandlerLabel", script_entity, args, script_id)
Which leads to the provided event handler being triggered. Target capabilities should match the Recipients enum.
Describe the solution you'd like
run_event_deferred: executes when the current callback ends. No frame delayrun_event: executes immediately, possibly returning a result.- Take into account the possibility that the triggered event might also lead to another event being triggered. If it can lead to a chain like that, then we also need to take into account infinite loops.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the callback and event-handling entry points, then inspect the Recipients enum and how BMS scripts currently invoke callbacks. Define how run_event and run_event_deferred should behave, including chained events and infinite-loop handling. Done means the requested script API supports the intended recipients and both execution modes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, rust
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100