Looks
Extension Description
Looks blocks are related to the appearance of sprites and the stage.
- Available in: Block Coding, Python Coding
- Mode: Stage Mode
- WiFi Required: No
- Compatible Hardware in Block Coding: evive, Quarky, Arduino Uno, Arduino Mega, Arduino Nano, ESP32, T-Watch, Boffin, micro:bit, TECbits, LEGO EV3, LEGO Boost, LEGO WeDo 2.0, Go DFA, None
- Compatible Hardware in Python: evive, Quarky, Arduino Uno, Arduino Mega, Arduino Nano, ESP32, T-Watch, Boffin, micro:bit, TECbits, LEGO EV3, LEGO Boost, LEGO WeDo 2.0, Go DFA, None
- Object Declaration in Python: sprite = Sprite("Sprite-Name")
- Extension Catergory: Default
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
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