(Redirected from Set Size to ()%)
|Set Size to ()%|
The Set Size to ()% block is a Looks block and a Stack block. 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.
This block is used to set the size of a sprite, meaning that it cannot be used to increase the size of the stage (which is currently unable to differ in size). Some common uses of this block are:
- Imitating distance in a 3D world
- Increasing the size of a button on mouse-over
repeat until <(mouse down) and (touching [mousepointer v])> if <touching [mousepointer v]> then set size to (110)% else set size to (100)% end
- Making enemies larger as the game progresses
forever set size to (((timer) / (5)) + (100))%
This block has one major drawback for use in a 3D world; when the sprite is being resized, the smaller the size the sprite is at the moment, the quicker it will become larger (it will enlarge much faster at size 10% than size 150%).
- Main article: List of Block Workarounds
This block can be replicated with the following code:
change size by ((wanted size) - (size))
Say () for () Secs • Say () • Think () for () Secs • 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 Number • Size
|For the Stage|