Goal:
Now let’s start adding code to the rocks in our game by adding new variables.
These new variables will set the speed of the rocks in the x and y direction.
Steps:
- Select the “Rocks” sprite.
- From Variables, create 2 new variables call these “xSpeed” and “ySpeed” (Be sure to select “For this sprite only” and be sure you are on the “Rocks” sprite).
- Click on the check box to uncheck the variables you just created.