(Redirected from Set Size to () (block))

Set Size to ()%
2.0 Set Size to ()%.png
Category Looks
Type Stack

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.

Example Uses

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 [mouse-pointer 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))%

Drawbacks

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%).

Workaround

Main article: List of Block Workarounds

This block can be replicated with the following code:

change size by ((wanted size) - (size))

See Also