MP4 Week 1
Using Variables to Trigger Events
Desert Rally Race!
Watch the Virtual Lesson Recordings if you missed chat!
- There is no Question of the Week!
- Condition: If touching car, then change life by -1
- Condition: If life is less than (<1), then car blows up
- Can you program the car sprites to randomly fly out of the car when the variable is less than 2-4 (<2, <3, <4)?
This script is in one forever loop!
Triggering an Event
One by one the sprites fly out of the car!
Life < 4
Once Gobo's life variable drops to < 4
Operator block: pick random
Gobo shoots out of the car to a random area. When he touches the top of the screen (y position = 180), Gobo disappears by using the hide block