Skip to content

Latest commit

 

History

History
37 lines (20 loc) · 743 Bytes

GetBlockById.float.md

File metadata and controls

37 lines (20 loc) · 743 Bytes

GetBlockById(float)

Returns a block with the specified id.

obj getBlockById(const float BLOCK)

Parameters

BLOCK

Modifiers: const

Type: float

Id of the block, one of BLOCK.

Returns

obj

The obj specified by BLOCK.

Remarks

  • The id of a block can be get by placing the block at (0, 0, 0) and running log(getBlock(0, 0, 0)) in the EditorScript.
  • EditorScript cannot connect wires to blocks, so if you are using it as the builder, you will have to connect the object wire to the block manually.

Examples

obj dirt = getBlockById(BLOCK_DIRT)