| This article has links to websites or programs outside of Scratch and Wikipedia. Remember to stay safe while using the internet as we cannot guarantee the safety of other websites. |
| Change Size by () | |
change size by () | |
| Category | Looks |
| Type | Stack |
| Introduced in | 08Jul04 (0.x) |
The Change Size by () block is a Looks block and a Stack block. The block adds its sprite's size by the specified number — a positive number to make it grow and a negative number to make it shrink.
Example Uses
As this block changes its sprite's size, it is used whenever a sprite's size must be changed. Some common uses are:
- A sprite in a 3D world that must change its size as it moves along the plane
- A growing object
- A shrinking object, usually to the point where it can be hidden. This can be achieved by putting a minus sign (-) in front of the value. For example, to make a sprite shrink by a small amount, the value -5 might be used.
- Changing the size of a paintbrush for painting
- Draining a pool of water by shrinking the water sprite
- Making an object that grows and shrinks continuously
Workaround
- Main article: List of Block Workarounds
The block can be replicated by setting the size directly using its value:
set size to ((size)+(. . .::grey))%
The size can also be decreased by using the minus operator or a negative number. However, this workaround is not as precise because the (size) block returns a rounded value.[1]
See Also
References
| For sprites |
Say () for () Seconds • Say () • Think () for () Seconds • Think () • Switch Costume to () • Next Costume • Switch Backdrop to () • Next Backdrop • Change Size by () • Set Size to ()% • Change () Effect by () • Set () Effect to () • Clear Graphic Effects • Show • Hide • Go to () Layer • Go () () Layers • Costume () • Backdrop () • Size
|
| For the Stage | |