Control

1. wait () seconds

Wait for a specified period of time to run the script.

Example:

Press Button A. One second later, Codey's screen will display the image.

2. repeat ()

Run the script for the specified number of times.

Example:

When Codey starts up, it will play the sound "hello" for ten times.

3. forever

Run the script repeatedly.

Example:

When Codey starts up, Codey's will repeated display the two images consecutively.

4. if () then ()

If the report condition is met, run the script.

Example:

When Codey starts up, if being shaken, Codey will play the sound "hello".

5. if () then () else ()

If the report condition is met, run script 1. If not, run script 2.

Example:

When Codey starts up, if there are obstacles ahead, Codey Rocky will stop moving. If not, Codey Rocky will keep moving forward at 50% power.

6. wait ()

Wait until the report condition is met. Run the script.

Example:

After starting up, Codey Rocky will keep moving forward at 50% power until Rocky detects obstacles ahead.

7. repeat until ()

Run the script repeatedly until the report condition is met.

Example:

After starting up, Codey Rocky will keep moving forward at 50% power until Rocky detects obstacles ahead.

8. stop ()

Stop the specified script or scripts. There are three options: all, this script, or other scripts in sprite.

Example:

Press Button A to stop all scripts.

Last updated