(Cleaned up and updated as part of the Full Wiki Cleanup) (canned edit summary)
m
 
(6 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{obsolete feature}}
+
{{obsolete feature|Backdrop () (block)}}
 
{{block
 
{{block
 
| name      = Backdrop name
 
| name      = Backdrop name
| image      = File:2.0 Backdrop Name.png
+
| image      = (backdrop name)
 +
| sb        = 2.0
 
| category  = [[Looks Blocks|Looks]]
 
| category  = [[Looks Blocks|Looks]]
 
| type      = [[Reporter Block|Reporter]]
 
| type      = [[Reporter Block|Reporter]]
| added      = 2.0
+
| added      = [[Scratch 2.0|2.0]]
 +
| removed    = [[Scratch 3.0|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''' block was a [[Reporter Block|reporter block]] and a [[Looks Blocks|looks block]]. The block held the current [[Backdrops|backdrop]] name.
  
This block was replaced with [[Backdrop () (block)]] in [[Scratch 3.0]], which combined this block with another one.
+
The block was replaced with the [[Backdrop () (block)|backdrop ()]] block in [[Scratch 3.0]], which combined this block with the [[Backdrop Number (block)|backdrop number]] block.
  
This block could be displayed as a [[Stage Monitor|stage monitor]].
+
The block was able to be displayed as a [[Stage Monitor|stage monitor]].
  
 
== History ==
 
== 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 [[sprite]]s, while the Backdrop Number is only in the stage.  
+
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 [[sprite]]s, while the Backdrop Number is only in the stage.
 
In [[Scratch 3.0]], this block was merged with [[Backdrop Number (block)|Backdrop #]] to create {{b|Backdrop ()}}.
 
In [[Scratch 3.0]], this block was merged with [[Backdrop Number (block)|Backdrop #]] to create {{b|Backdrop ()}}.
  
 
== Example Uses ==
 
== 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:
+
This block held the backdrop name of the Stage and 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
 
* Stopping the [[project]] once the Stage reaches the backdrop for the end of the project
<scratchblocks>
+
<scratchblocks version="2.0">
when gf clicked
+
when green flag clicked
 
wait until <(backdrop name) = [The End]>
 
wait until <(backdrop name) = [The End]>
 
stop [all v]
 
stop [all v]
 
</scratchblocks>
 
</scratchblocks>
 
* Checking what the current backdrop is
 
* Checking what the current backdrop is
<scratchblocks>
+
<scratchblocks version="2.0">
if <(backdrop name) = [Level 1]> then
+
if <(backdrop name) = [Level 1 - Start]> then
 
   say [Welcome to the game! Use WASD to move.] for (4) secs
 
   say [Welcome to the game! Use WASD to move.] for (4) secs
 
end
 
end
if <(backdrop name) = [Level Boss]> then
+
if <(backdrop name) = [Level 5 - Boss Fight]> then
 
   say [Watch out for the boss's laser attack!] for (4) secs
 
   say [Watch out for the boss's laser attack!] for (4) secs
 
end
 
end
 
</scratchblocks>
 
</scratchblocks>
 +
<!--- do not change the above to "seconds" as it is 2.0 styling -->
 
* Setting a [[variable]] to the current backdrop
 
* Setting a [[variable]] to the current backdrop
<scratchblocks>set [variable v] to (backdrop name)</scratchblocks>This block also gives more meaning to naming backdrops.
+
<scratchblocks version="2.0">
 +
set [variable v] to (backdrop name)
 +
</scratchblocks>
  
 
== Workaround ==
 
== Workaround ==
 
{{main|List of Block Workarounds}}
 
{{main|List of Block Workarounds}}
This block could simply be replicated with the following code:
+
This block can be replicated with the block that replaced it:
  
<scratchblocks>([backdrop name v] of [Stage v])</scratchblocks>
+
<scratchblocks>(backdrop [name v])</scratchblocks>
  
or
+
It can alternatively be replicated by finding the backdrop name through the [[() of () (Sensing block)|() of ()]] sensing block:
  
<sb>(backdrop [name v])</sb>
+
<scratchblocks>([backdrop name v] of [Stage v])</scratchblocks>
  
 
== See Also ==
 
== See Also ==

Latest revision as of 01:12, 6 September 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
(backdrop name)
Category Looks
Type Reporter
Introduced in 2.0
Removed in 3.0

The backdrop name block was a reporter block and a looks block. The block held the current backdrop name.

The block was replaced with the backdrop () block in Scratch 3.0, which combined this block with the backdrop number block.

The block was able to 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 and 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 green flag clicked
wait until <(backdrop name) = [The End]>
stop [all v]
  • Checking what the current backdrop is
if <(backdrop name) = [Level 1 - Start]> then
  say [Welcome to the game! Use WASD to move.] for (4) secs
end
if <(backdrop name) = [Level 5 - Boss Fight]> 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)

Workaround

Main article: List of Block Workarounds

This block can be replicated with the block that replaced it:

(backdrop [name v])

It can alternatively be replicated by finding the backdrop name through the () of () sensing block:

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

See Also