Modify Block State (Block Action Type)

Modifies the block state property of the block.

Modifies the block state property of the block. Depending on the property type, different values are expected: boolean properties use value, enumeration properties use enum, and integer properties use operation and change.

Type ID: apoli:modify_block_state

If none of the expected fields are specified, this action will do nothing.

Fields

FieldTypeDefaultDescription
propertyStringThe name of the property that will be modified. Examples are facing or age.
operationString"add"Determines how the value specified in the change field is operated on the specified property. Accepts "add" or "set".
changeIntegeroptionalIf specified, the value to add, remove or set to/from the specified property if the specified property is an integer.
valueBooleanoptionalIf specified, the boolean to use as the new value for the specified property if the specified property is a boolean.
enumStringoptionalIf specified, the string to use as the new value for the specified property if the specified property is a string.
cycleBooleanfalseIf set to true, changes the property to the next state in the cycle, ignoring all other optional fields. All property types can use this operation.

Examples

"block_action": {
	"type": "apoli:modify_block_state",
	"property": "facing",
	"cycle": true
}

This example will cycle through the values of the facing property if available.