Difference between revisions of "Block (TeaScript)"

From PGE Wiki
Jump to navigation Jump to search
Line 27: Line 27:
 
|<code>id</code>
 
|<code>id</code>
 
|The current block number.
 
|The current block number.
 +
|-
 +
|<code>State</code>
 +
|If set 1, it hits the block. |Any other value will break it.
 +
|-
 +
|<code>Hide</code>
 +
|Whenever the block is hidden or not. If the layer of the block is hidden it turns 1, else 0.
 
|-
 
|-
 
|<code>advset</code>
 
|<code>advset</code>
 
|The ID of the NPC the block contains.
 
|The ID of the NPC the block contains.
 
|-
 
|-
|pcollision
+
|<code>pcollision</code>
 
|The player collision type of the block.
 
|The player collision type of the block.
 
|-
 
|-
|ncollision
+
|<code>ncollision</code>
 
|The NPC collision type of the block.
 
|The NPC collision type of the block.
 
|-
 
|-
|forecolor
+
|<code>forecolor</code>
 
|The color of the block. Uses rgba.
 
|The color of the block. Uses rgba.
 
|}
 
|}

Revision as of 02:43, 11 January 2020

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 ID. To change the value of Block use:

Block(id).name = value
Name Description
X The X coordinate of the block.
Y The Y coordinate of the block.
Xsp The X-speed of the block.
Ysp The Y-speed of the block.
id The current block number.
State Any other value will break it.
Hide Whenever the block is hidden or not. If the layer of the block is hidden it turns 1, else 0.
advset The ID of the NPC the block contains.
pcollision The player collision type of the block.
ncollision The NPC collision type of the block.
forecolor The color of the block. Uses rgba.