Step 7: Creating New Variables for the Rocks

Goal:


Now we will need to create two new variables that will be used for spawning the rocks in the game.

Steps:

  1. From Variables, create two variables and call these “newX” and “newY”.
  2. Be sure to select “For this sprite only” and be sure you are on the “Rocks” sprite.
  3. From Variables, click on the check box to uncheck the two new variables we just created.

Code:


Click to replay