Skip to main content

Block

Blocks are objects in abilities and the datum property of parameters, with one minor difference between these contexts.

Common Properties

block_class

Typestring

Represents the block's class type.

Possible values include:[needs elaboration]

  • "method": for loopless blocks, such as Move Forward, Set Variable, Comment, etc.
  • "conditionalControl": for Check Once and Check If Else loops.
  • "control": for Draw a Trail and other loop blocks.[needs verification]
  • "conditionalOperator": for conditional operators, including =, , < and >.
  • "operator": for math and string operators, such as +, -, ×, ÷, Random, and HSB.

Unused.[needs research]

"block_class": "conditionalControl"

description

Typestring

The label of the block type.

Unused.[needs research]

"description": "Draw a Trail"

keyboardName

Typestring

Not always used. Only seems to exist in certain operator blocks. The extended name of a block, as one might type in a search for the block.[needs research]

"keyboardName": "Add"

type

Typenumber

A magic number that corresponds to the block's type and behavior.[needs verification]

For a full list of possible values, see Viewing Types.

"type": 41

parameters / params

Typearray

Contains the block's parameter objects.

Nuances

  • If the block is inside of an ability, the key is called parameters.
  • If the block is inside of a parameter's datum property, the key is instead called params.

Loops

The following properties only exist in blocks with inner loops, such as Check Once If and Draw a Trail:

controlScript

Typeobject

Contains an abilityID property, referencing the ability with the loop's contents.

"controlScript": {
"abilityID": "F4911EE3-010E-F139-55C3-9B5D7F4B140B"
}

controlFalseScript

Typeobject

Only present on Check If Else blocks.

Contains an abilityID property, referencing the ability with the loop's Else contents.

"controlFalseScript": {
"abilityID": "F4911EE3-010E-F139-55C3-9B5D7F4B140B"
}