makspll / makspll/bevy_mod_scripting

Allow for triggering Events/writing Messages from script

Open
#528 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.