(Redirected from (Size))

This article is about the block. For more information on the value this block reports, see Size (value).
Size
(size)
Category Looks
Type Reporter

The Size block is a Looks block and a Reporter block. The block holds its sprite's size and can also be displayed as a Stage monitor.

Example Uses

The size block is not commonly used; although many projects use the Set Size to () block, they rarely need to know about a sprite's current size. Usually a change in size is pre-planned, such as in animations.

Some common uses are:

  • Math tools and formulas
  • 3 dimensional scenes where points are partly based on size values
  • Changing an effect based on the size
  • Bouncing an object (from a bird's eye view)

To implement the fourth, the following script can be used:

when flag clicked
forever
set size to (100)%
repeat (10)
change size by ((size) / (10))
wait (0.1) secs
end
repeat (10)
change size by (((size) / (10)) * (-1))
wait (0.1) secs
end
end

Workaround

Main article: List of Block Workarounds

This block can be replicated with the following code:

([size v] of [wanted sprite v])
//or
when gf clicked
forever
set size to (sizе)%
end
//Then, you can use
(sizе)
//to get the size and
set [size v] to [100]
//to set it.

See Also