(Cleaned up and updated as part of the Full Wiki Cleanup) (canned edit summary)
(Added that the block was removed in 3.0)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{obsolete feature}}
+
{{obsolete feature|Backdrop () (block)}}
 
{{block
 
{{block
 
| name      = Backdrop name
 
| name      = Backdrop name
Line 6: Line 6:
 
| type      = [[Reporter Block|Reporter]]
 
| type      = [[Reporter Block|Reporter]]
 
| added      = 2.0
 
| added      = 2.0
 +
| removed    = 3.0
 
}}
 
}}
 
The '''Backdrop Name''' [[Blocks|block]] was a [[Looks Block]] and a [[Reporter Block]]. The block holds the current [[Backdrops|backdrop]] name. This is the first time that the costume/backdrop name can be accessed through a block.
 
The '''Backdrop Name''' [[Blocks|block]] was a [[Looks Block]] and a [[Reporter Block]]. The block holds the current [[Backdrops|backdrop]] name. This is the first time that the costume/backdrop name can be accessed through a block.

Latest revision as of 11:13, 21 January 2020

Archive.png This article or section documents something not included in the current version of Scratch (3.0). It is only useful from a historical perspective. For information on the feature that replaced this one, see Backdrop () (block).
Backdrop name
2.0 Backdrop Name.png
Category Looks
Type Reporter
Introduced in 2.0
Removed in 3.0

The Backdrop Name block was a Looks Block and a Reporter Block. The block holds the current backdrop name. This is the first time that the costume/backdrop name can be accessed through a block.

This block was replaced with Backdrop () (block) in Scratch 3.0, which combined this block with another one.

This block could be displayed as a stage monitor.

History

Prior to Scratch 2.0, this block did not exist. Instead, the Backdrop Number (block) had to be used instead. Another alternative would be to list each costume name in a list. Both these blocks became available in Scratch 2.0 and can each be used to meet a specific project's needs. One notable difference was that the this block was available in both the Stage and sprites, while the Backdrop Number is only in the stage. In Scratch 3.0, this block was merged with Backdrop # to create Backdrop ().

Example Uses

This block held the backdrop name of the Stage, therefore it was used when something needed to happen if the Stage was at a specific backdrop. Some of the more common uses were:

  • Stopping the project once the Stage reaches the backdrop for the end of the project
when gf clicked
wait until <(backdrop name) = [The End]>
stop [all v]
  • Checking what the current backdrop is
if <(backdrop name) = [Level 1]> then
  say [Welcome to the game! Use WASD to move.] for (4) secs
end
if <(backdrop name) = [Level Boss]> then
  say [Watch out for the boss's laser attack!] for (4) secs
end
  • Setting a variable to the current backdrop
set [variable v] to (backdrop name)
This block also gives more meaning to naming backdrops.

Workaround

Main article: List of Block Workarounds

This block could simply be replicated with the following code:

([backdrop name v] of [Stage v])

or

(backdrop [name v])

See Also