Block (TeaScript)

From PGE Wiki
Jump to navigation Jump to search

Block is a class in TeaScript.vbs that allows you to read/write values for blocks.

To read the value of Block use:

Block(id).name

id stands for the block's permanent ID. To change the value of Block use:

Block(id).name = value
Name Type Description
x R&W The X coordinate of the block.
y R&W The Y coordinate of the block.
xsp R&W The X-speed of the block.
ysp R&W The Y-speed of the block.
id R&W The current block number.
state R&W If set to 1, it will hit the block. Any other value will break it.
hide R&W Stands for whenever the block is hidden or not. (If the layer of the block is hidden, it turns 1)
advset R&W The ID of the NPC the block contains.
pcollision R The player collision type of the block.
ncollision R The NPC collision type of the block.
forecolor R&W The color of the block. Uses rgba.