makspll / makspll/bevy_mod_scripting
Allow for triggering Events/writing Messages from script
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 649
- Forks
- 59
- PR merge metrics
- No merged PRs in 30d
Description
Is your feature request related to a problem? Please describe.
I found an use case when I would like to trigger an observer or write a message from script.
Describe the solution you'd like
Add a method to world type equivalent to https://docs.rs/bevy/latest/bevy/prelude/struct.World.html#method.trigger and https://docs.rs/bevy/latest/bevy/prelude/struct.World.html#method.write_message
Describe alternatives you've considered
I worked around it by converting a Message in my game to Component and spawned entities instead. Its ..okay as It was only one Message and not used much, but that would not scale well.
Additional context
Add any other context or screenshots about the feature request here.
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 script-facing world type and the existing event or message APIs, then compare their behavior with Bevy World::trigger and World::write_message. Done means scripts can trigger observers and write messages through equivalent methods, with coverage for both paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, rust
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100