Set or Change Size
-
Prerequisite
Description
The “Change Size by ()”, “Set Size to ()” and “Reduce Size by ()” are stack blocks in the Looks category. These blocks are used to change the the size of a “sprite” in different ways.“
About the Size of a sprite
The size of a sprite is displayed in the sprite pane below the stage. Its value tells us how big or small the sprite is relative to its original size. For example, by default, a sprite is at size 100. When we change it to 200, that sprite will be double the size. When we change it to 50, it will become only half of the original size.
Note that you can not compare 2 sprites using their size values. For example, the bear is at size 90 and the hippo is at size 120, but the bear is still larger than the hippo, because the original image of the bear is much larger.
Change Size by ()
This block is used to change a sprite’s size relatively. It increases the size of the sprite when we input a positive number (like 10), and reduces the size of the sprite when we input a negative number (like -10).
For example: In the gif below, every time the “Change size by ()” block is played, the size of the sprite increases according to the input value.
Set Size to ()
This block is used to set the size of a sprite directly.
For example: If you play the “Set size to (100)” block, it will change the size of the sprite to 100% of its original size.
Reduce Size by ()
This block is used to make a sprite smaller. When you input a number like 10, it reduces the size of the sprite by that much.
For example: In the gif below, every time the “Reduce size by ()” block is played, the size of the sprite decreases according to the input value.
The Size Tool
You can also change the size of a sprite using the “size” tool in the sprite pane. You have to type the value of size in the input box and then press the ENTER key on the keyboard.