The Backdrop Name is a local value which is set to the name of the current backdrop of the Stage. All backdrops have both a name, and a number identifying their position in the backdrops pane in the Paint Editor.
There is a block that reports this value, so it can be stored in a variable:
when gf clicked forever set [variable v] to (backdrop [name v]) end
The following blocks can be used in conjunction with this value:
(backdrop [ v])— The stage monitor and reporter block of the backdrop name or number
switch backdrop to (backdrop1 v)— Switches to a certain backdrop and changes the backdrop number
next backdrop— A Stage-only block that switches to the next backdrop and changes the backdrop number by 1
when backdrop switches to [backdrop1 v]— A hat block that starts a script when a certain backdrop is displayed
This value can be used in a number of ways:
- Reporting what backdrop is displaying on the stage
when green flag clicked say (join (backdrop [name v] :: looks) [world]) for (2) secs
- Doing an action for a specific backdrop
when green flag clicked if <(backdrop [name v] :: looks) = [dungeon]> then play sound (dungeon music v) until done end
The Wiki is working on a dark theme, and you're seeing it! Got feedback? Post on the Wiki Forum Topic.