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
Related Blocks
The following blocks can be used in conjunction with this value:
(backdrop [ v])
— The Stage Monitor and reporter block of the backdrop name or numberswitch backdrop to (backdrop1 v)
— Switches to a certain backdrop and changes the backdrop numbernext backdrop
— A stage-only block that switches to the next backdrop and changes the backdrop number by 1when backdrop switches to [backdrop1 v]
— A hat block that starts a script when a certain backdrop is displayed
Example Uses
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]) [world]) for (2) secs
- Doing an action for a specific backdrop
when green flag clicked if <(backdrop [name v]) = [dungeon]> then play sound (dungeon music v) until done end