Revision as of 17:34, 10 December 2018 by InterwikiBot (talk | contribs) (Adding interwikis.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

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

Example Uses

The block is not commonly used; although many projects use the Set Size to () block, rarely do they need to know 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