Revision as of 02:38, 29 December 2012 by Mathfreak231 (talk | contribs) (Example Uses: separated scratch blocks)

Clock.png This article or section contains information about a feature from a future version of Scratch that is unreleased and is subject to change. Please cite any additional info in order to prevent speculation.
Switch to Scene ()
Switch to scene.png
Category Looks
Type Stack
Introduced in 2.0

The Switch to Scene () block is a Looks block and a Stack block. It functions identically to the Start Scene () block. This block is only available to the Stage, while the other is for all sprites. It is likely that this block is in Looks because Switch to Background () was in Looks in the 1.x series, and so provides a natural place to look.

Prior to Scratch 2.0, this block was called Switch to Background () and didn't fire an event upon running.


Main article: List of Block Workarounds

Due to the fact that the Start Scene () block works identically, this block can simply be replaced with the other.

start scene [scene1 v]

Example Uses

  • Starting a level
switch to scene [level1 v] // in the Stage
when scene [level1 v] starts //in a sprite
go to x:(0) y:(0)
  • A game over message
switch to scene [game over v]
when scene [game over v] starts
  • Simply changing scenes
switch to scene [scene2 v]

See Also