Asteroids
Step 20: Bullet Collision IF 4
Step 21: Bullet Delete
Step 22: Big Asteroid Start Position
Step 23: Big Asteroid Clone
Step 24: Setting a Random Direction
Step 25: Direction 1 IF Statement
Step 26: Direction 1 Set Y
Step 27: Direction 1 Set X
Step 28: Direction 2 IF Statement
Step 29: Direction 2 Set X
Step 30: Direction 2 Set Y
Step 31: Direction 3 IF Statement
Step 32: Direction 3 Set Y
Step 33: Direction 3 Set X
Step 34: Direction 4 IF Statement
Step 35: Direction 4 Set X
Step 36: Direction 4 Set Y
Step 37: Big Asteroid Show and Direction
Step 38: Big Asteroid Move
Step 39: Bullet Collision with Big Asteroid
2 of 4
Previous Lesson
Next Lesson
Step 27: Direction 1 Set X
Asteroids
Step 27: Direction 1 Set X
Goal:
Randomizing X will let the Big Asteroid appear in any direction left or right.
Steps:
From
Operators,
place a
pick random number
in the
X
spot.
Set the
random
block to
-240
and
240.
Code:
Previous Lesson
Back to Course
Next Lesson