Condition
This page was last updated for version v1.2.0
Format
conditional (condition) ? execute-if-condition-is-true : execute-if-condition-is-false
Examples
conditional (timer>=20) ? variable timer=0 : variable timer+=1
Set the timer to 0 when the timer is greater than or equal to 20
Add 1 to the timer when the timer is less than 20
conditional (reverse==1 && x>90) ? variable reverse=0 : none
Set reverse to 0 when reverse is equal to 1 and x is greater than 90
Otherwise, do nothing
conditional ((reverse==1 && x>90) || (reverse!=1 && x<0)) ? preset play-sound : none
Play sound when (the reverse is equal to 1 and x is greater than 90) or (the reverse is not equal to 1 and x is less than 0)
Otherwise, do nothing
You must put the conditions between ()
You cannot put a condition inside a condition but you can define a preset for that:
Create a preset in presets.yml (see Presets)
In your condition, put the preset into the correct place
Example
presets.yml
effects.yml
Last updated