-
Notifications
You must be signed in to change notification settings - Fork 3
BLOCKS ACTION
ACTION Blocks are runnable. They do some form of action and even though yield a value, can't be used as value blocks.
Sends a value down the chain of blocks.
The return value of the block.
{
"type": "RETURN",
"value": 10.5
}
Solves the condition and runs one of the two set action blocks (or runs none at all if the condition
is false
and the else
parameter is not set).
ALLOWED TYPES:
Any CONDITION
The condition it needs to solve.
ALLOWED TYPES:
Any ACTION
The action block that is ran when the condition is true.
ALLOWED TYPES:
Any ACTION
The action block that is ran when the condition is false. This parameter is optional - omitting this causes it to be
null
by default, which theIF
block just skips then.
{
"type": "IF",
"condition": {
"type": "NOT",
"input": false
},
"then": {
"type": "RETURN",
"value": "Yes"
},
"else": {
"type": "RUN",
"name": "external"
}
}
Runs an AMG!Function. Yields the value that was gotten from the function's RETURN
block.
The name of the function to run.
The parameters, which to use to run the function. This needs to be a dictionary, each key is the key of the parameter that's registered on the function's head, while every value is the actual value that will be attached for that key.
What value type to use for what key depends on the function's headers.
{
"type": "RUN",
"name": "colorize",
"parameters": {
"user_color": {
"type": "PARAMETER",
"name": "color"
}
}
}