Looks

Looks
Extension Description
Looks blocks are related to the appearance of sprites and the stage.

Introduction

Looks is one of the ten categories of default Scratch blocks. They are color-coded purple and are used to control a Sprite’s appearance.

Using Looks Functions in Python

The looks functions can be used in Python with the sprite object defined:

sprite = Sprite('Tobi')
Read More

PictoBlox Blocks

The block displays a speech bubble with the specified text for the sprite that runs it, which appears on the screen for the specified amount of seconds.
The block gives its sprite a speech bubble with the specified text — the speech bubble stays until another speech or thought block is activated, or the stop sign is pressed.
The block gives its sprite a thought bubble with the specified text, which stays for the specified amount of seconds.
The block gives its sprite a thought bubble with the specified text. The thought bubble stays until a speech or thought block with its text block empty is activated, or the stop sign is pressed.
The block changes its sprite’s costume to a specified one.
The block changes its sprite’s costume to the next one in the costumes pane, but if the current costume is the last in the list, the block will loop to the first.
The block changes the Stage’s backdrop to the specified one.
The block changes the backdrop to the next in the list of backdrops, but if the current backdrop is the last in the list, the block will loop to the first.
The block changes its sprite’s size by the specified amount. The default sprite size is 100; size values below that percentage are for shrunken sprites, and size values above it are for overlarge sprites.
The block sets its sprite’s size to the specified amount. The default sprite size is 100%; anything lower than that will decrease the size of the sprite on the stage, and anything above will increase the size of the sprite on the stage.
The block changes the specified effect on its sprite by the specified amount. There are seven different effects to choose from: colour, fisheye, whirl, pixelate, mosaic, brightness and ghost.
The block sets the specified effect on its sprite to the specified amount
This block resets all 7 graphic effects.
If the block’s sprite is hidden, it will show the sprite. If the sprite is already showing, nothing will change.
If the block’s sprite is shown, it will hide the sprite. If the sprite is already hidden, nothing happens.
The block will place a sprite in front of all other sprites. It does this by changing the sprite’s layer value.
The block holds its sprite’s current costume number.
The block holds the current backdrop number.
The block holds its sprite’s size. This block can be displayed as a Stage monitor.
All articles loaded
No more articles to load

Block Coding Examples

All articles loaded
No more articles to load

Python Functions

The function gives its sprite a speech bubble with the specified text — the speech bubble stays until another speech or thought block is activated, or the stop sign is pressed.
Syntax: say(message = “Hello!”, time = 0)
The function gives its sprite a thought bubble with the specified text, which stays for the specified amount of seconds.
Syntax: think(message = “Hello!”, time = 0)
The function changes its sprite’s costume to a specified one.
Syntax: switchcostume(costume_name = “Tobi Jump”)
The function changes its sprite’s costume to the next one in the costumes pane, but if the current costume is the last in the list, the block will loop to the first.
Syntax: nextcostume()
The function changes the Stage’s backdrop to the specified one.
Syntax: switchbackdrop(backdrop_name = “backdrop1”)
The function changes the backdrop to the next in the list of backdrops, but if the current backdrop is the last in the list, the block will loop to the first.
Syntax: nextbackdrop()
The function changes its sprite’s size by the specified amount. The default sprite size is 100; size values below that percentage are for shrunken sprites, and size values above it are for overlarge sprites.
Syntax: changesize(percentage = 10)
The function sets its sprite’s size to the specified amount. The default sprite size is 100%; anything lower than that will decrease the size of the sprite on the stage, and anything above will increase the size of the sprite on the stage.
Syntax: setsize(percentage = 100)
The function changes the specified effect on its sprite by the specified amount. There are seven different effects to choose from: colour, fisheye, whirl, pixelate, mosaic, brightness, and ghost.
Syntax: changeeffect(effect_name = “COLOR”, effect_value = 25)
The function sets the specified effect on its sprite to the specified amount. There are seven different effects to choose from: color, fisheye, whirl, pixelate, mosaic, brightness, and ghost.
Syntax: seteffect(effect_name = “COLOR”, effect_value = 25)
This function resets all 7 graphic effects.
Syntax: cleareffects()
If the sprite is hidden, it will show the sprite. If the sprite is already showing, nothing will change.
Syntax: show()
If the sprite is showing, it will hide the sprite. If the sprite is already hidden, nothing happens.
Syntax: hide()
The function will place a sprite in front of all other sprites. It does this by changing the sprite’s layer value.
Syntax: gotolayer(postition = “front”, layer_number = 1)
The function changes its sprite’s layer value by the specified amount. This function is rather unusual compared to other functions. It moves the layer value back, and not forward. To move it forward instead, a negative number can be used.
Syntax: changelayer(postition = “forward”, layer_number = 1)
The function returns its sprite’s current costume number or name.
Syntax: costume(result_type = “number”)
The function returns its sprite’s current backdrop number or name.
Syntax: backdrop(result_type = “number”)
The function returns its sprite’s size.
Syntax: size()
All articles loaded
No more articles to load

Python Coding Examples

All articles loaded
No more articles to load
Table of Contents