STEP 9: Each time the interval event runs, we will also create an obstacle to avoid. Let's use a function for that!
A function is piece of reusable code that performs a specific action. Functions must be defined and called.
- Go to the LOGIC tab and toolkit. Drag out Define Function to the bottom of the program.
- Change the name of the function from my_function to make_blocks. This is where we'll make the blocks!
- Click Run. You won't see the function doing anything until we call it. That's the next step!
To navigate the page using the TAB key, first press ESC to exit the code editor.