-
Notifications
You must be signed in to change notification settings - Fork 0
03. Scripting and Compiling
For the player to run the script, the script must first be compiled. By pressing the compile button the compiler will check for errors (incorrect formatting, wrong arguments, etc) and if there are none, the script will be compiled and ready to run. Each line must start with the name of the six instructions or //
, which denotes a comment. //
can also be used for custom randomization, which will be explained below.
A warning will pop up when trying to run a script when it has been modified after the last compile time.
If you select "Hotkey" as your player, you will be required to place instruction blocks below an ASSIGN statement. The ASSIGN statement takes 2 arguments, the first being key
or mouse
. The second argument is an integer representing the key or mouse button ID. When the hotkey player is run, pressing the correct mouse buttons or key will result in the corresponding instruction block being executed.
By specifying // SectionRandomize=true
, every instruction below it will only be randomized if in a section. This behavior can be reset by specifying // SectionRandomize=false
, which makes every instruction below it get randomized. This instruction has to be exact for this to work.
When section randomization is enabled, a new section can be started by typing in // StartSectionRand
. This will make all instructions below be eligible for randomization until // EndSectionRand
is seen below. Sections cannot intersect.
Another type of section is // StartSectionRandBalance
. This section is the same as StartSectionRand, except that the total delay time (obtained by summing up all the delays) of this section is guaranteed to be the same. To achieve this, a Delay instruction is required to be put right before this section ends. If the total delay time cannot be the same (e.g. a delay of 500MS had an offset of 30MS added, but the Delay instruction right before only has an offset of 20MS) an error appears, which can be fixed by extending the last delay or changing the seed.