Skip to content

Special Forms

Sambo3975 edited this page Jan 2, 2022 · 3 revisions

Special Forms

In the place of an input instruction, you may use one of the following special forms.

Special Form Description
{"do", actions} Complete the instructions in actions a single time. This allows for "function calls," of a sort, in your input instructions, if there is an input sequence that needs to be made on multiple occasions
{"dotimes", repeats, actions} Repeat actions a number of times equal to repeats. If repeats is 0 or less, this has no effect
{"while", condition, actions} Repeatedly complete the instructions in actions until condition fails
{"if", condition, actionsIfTrue, actionsIfFalse} If condition is true, complete the instructions in actionsIfTrue. Otherwise, complete the instructions in actionsIfFalse.
{"when", condition, actions} If condition is true, complete the instructions in actions
{"unless", condition, actions} If condition is false, complete the instructions in actions
{"randomInput", inputs, min, max} Choose a random input from inputs that will last between min and max ticks. Used for making the player do weird things while waiting for something
{"mvc", sequence} Controls a Player-Controlled Mutant Vine using the given input sequence, in parallel with the bot's player control. This can be done because a Mutant Vine technically only needs one tick of input every 16th frame. Silly, I know, but I wanted it. A page for this will be added soon
{"optimize", input, mode, failCondition, successCondition, lo, hi} Basic input optimizer. Needs its own page, which will be added soon
{"clearOptimizationData"} Resets the saved optimization data. Needed because optimization data must persist between runs
Clone this wiki locally