Script Block: Difference between revisions
Incorporate more Script articles
-u ndefined- (talk | contribs) m (Import image) |
-u ndefined- (talk | contribs) (Incorporate more Script articles) |
||
(One intermediate revision by the same user not shown) | |||
Line 7: | Line 7: | ||
A '''script block''' block that is only visible on editor (unless only script blocks are in the level), it cannot be used as an object and doesn't have a [[Collider]]. | A '''script block''' block that is only visible on editor (unless only script blocks are in the level), it cannot be used as an object and doesn't have a [[Collider]]. | ||
Script blocks can be | [[File:Script Block button.png|thumb|none|The option to open the block. This is where to generally compact scripts in a singular location.]] | ||
A maximum of four custom blocks containing scripts can be nested inside. The "Too many blocks inside blocks!" error displays if more than four is nested. | |||
== Wire ports == | |||
To create a wire port, open the block and drag an open input or output wire to the side of the script block. The wire should snap to the block. | |||
Script block's ports are usually 3 voxels away from left/down, and 1 voxel away from the bottom. | |||
Rename by tapping on the block and dragging the port, leaving it unconnected. Then, tap on the button on the bottom-right corner to change name. | |||
Remove a port by opening the script block, tapping one of the two blocks that connect, then disconnecting the other end. | |||
You may have a [[wire splits|wire split]] at a port; with an input or output of the same type, create a wire port while aligning it with the port to share multiple values. | |||
[[Category:Blocks]] | [[Category:Blocks]] | ||
[[Category:Scripting]] |