In this lesson, you will learn what each control block does.
The control blocks are the ones that are colored in light orange. Let’s learn what each block does.
The “wait 1 seconds” block
The “wait 1 seconds” block waits the specified number of seconds and then, continues with the next blocks. You can write any other number instead of 1.
The “repeat 10” block
The “repeat 10” block runs the script inside repeatedly for the specified number of time. You can change the number 10 to the number of times you want to repeat.
The “forever” block
The “forever” block runs the script inside over and over without stopping.
The “if then” block
The “if then” block runs the script inside it if the condition is true. The condition is put in the blank that is darker than the color of the original block and we put the code we want to run inside.
The “if then else” block
The “if then else” block runs the script inside the if portion if condition is true. If not, runs the script inside the else portion.
The “wait until” block
The “wait until” block waits until condition is true, then runs the blocks attached to it.
The “repeat until” block
The “repeat until” block repeats blocks inside it until condition is true.
The “stop all” block
The “stop all” block stops all scripts in all sprites including the background. You can select “this script” from the drop-down menu to stop the current script. Selecting “other scripts in sprite” from the drop-down menu will stop the other scripts in the sprite.
The “create clone of myself” block
The “create clone of myself” block creates a copy that lasts only when the program is running. You can select another sprite’s name from the drop-down menu to create clone of the other sprite.
The “when I start as clone” block
The “when I start as clone” block tells a clone what to do once it’s created.
The “delete this clone” block
The “delete this clone” block deletes the current clone.
Note: The clone will automatically be deleted when you click the red stop sign.