Two-state doodads (global ON/OFF messages) #14
Labels
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: SketchyMaze/doodle#14
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is an idea how to add a global two-state ON/OFF set of doodads for levels, similar to the two-state blocks in Mario Maker 2 or the blue switches on Chip's Challenge.
Currently, we have switches that can toggle doors open and closed but the map editor must link these together manually. The two-state doodads instead should work globally, where the ON/OFF switch should toggle the state of ALL two-state doodads without needing to be manually linked up.
Pub/Sub Broadcast
To implement the global messaging without manually linking the doodads, add a new method to the
Message
API for the Doodad scripts:It will be like
Message.Publish()
but sends the message to ALL doodads whether they're linked to the publisher or not.On the recipient side, they will
Message.Subscribe("name", func)
as always.Implemented in
8965a7d86a