Looks
Looks is the second category of blocks, and it carries over 15 commands (7 as stage), 6 reporters, and 1 predicate (6 as stage). In Dev Mode there's 3 more commands. These blocks are used for sprite and stage appearance.
Block | Function | Options |
---|---|---|
Commands (15) | ||
switch to costume [ V]::looks |
Tells the sprite or stage to switch its current costume/backdrop to a different one. | Select a costume/backdrop to switch to. A costume (created by new costume, stretch or a list of pixels, for example) can be dropped onto the input slot. |
next costume |
Tells the sprite or stage to advance to the next costume/backdrop. If its currently on the last one, it will switch to the first costume/backdrop. | |
say [Hello!] for (2) secs say [Hello!] think [Hmm...] for (2) secs think [Hmm...] |
Puts a speech bubble on a sprite in order to make it say something or think of something. | |
set [ghost V] effect to (0) change [ghost V] effect by (25) |
Changes the amount of an effect. | Effects:
|
clear graphic effects |
Sets all effects back to 0. | |
set size to (100) % change size by (10) |
Changes the sprite's size. | |
show hide |
Shows or hides the sprite. | |
go to [front V] layer go back (1) layers |
Changes the sprite's layer. | On the go to front layer block, you can change it to back to go to the back instead. |
Reporters (6) | ||
(costume #) |
Reports a number based on what costume/backdrop the sprite or stage is currently using. | |
([width V] of costume [ V]) |
Returns a value of properties of a costume/backdrop. |
Provide a costume/backdrop there. Select Current is read properties of the current costume/backdrop. |
(stretch [ V] x: (100) y: (50) %) |
Returns a image of an alteration of costume/backdrop. Use this to change its size, mirror it, or distort it. | Provide a costume/backdrop there. Select Current if you want to use the current costume/backdrop. |
([ghost V] effect) |
Returns the current value of an effect. | Effects:
|
(size) |
Reports the sprite's size as a percentage of normal. | |
(new costume @list width ( v) height ( v)) |
reports a costume based on the pixel data input as list. | |
Predicates (1) | ||
<shown?> |
Reports whenever the sprite is shown or hidden. | |
Dev Mode Blocks (3) | ||
console log [] @delInput @verticalEllipsis @addInput
|
Logs the inputs,connected,by,commas into the browser console. | |
alert [] @delInput @verticalEllipsis @addInput
|
Opens a dialog saying "snap.berkeley.edu says Snap! inputs,divided,by,commas. | |
save [pen trails V] as costume named [screenshot]
|
Saves the selected input as a costume with the name in the second input. |
|