Sign in
Home
Online Classes
Instructors
Tutorials
☰
Register
Sign in
Online Classes
Instructors
Tutorials
1. Make a Target and Particle Sprite
2. Make your Target Move Randomly
3. Move our Target and Broadcast a Hit
4. Handle a Hit Event
5. Manage Explosions
6. Multiple Particles and Recieving a Hit Event.
7. Add Visual Effects
8. (Optional) Double Target
9. (Optional) Score
Project 93: Explosions
5. Manage Explosions
When a particle receives the explosion event it should point in a random direction and move several steps in that direction. Use random numbers and a repeat loop to accomplish your goal.
Starting point file for this challenge
Your goal
Hint: show steps
Steps
1. Grab the Event Listener
Hint: show details
Look for the “when I receive ____” block in the Yellow Events Tab. Make sure to switch it to the "explode" event we created last challenge.
Hint: show image
2. Point the Particle
Hint: show details
Attach a "point in direction ___" block from Motion. This block will help tell each particle to head in a different direction.
Hint: show image
3. Randomize a direction
Hint: show details
Get a "pick random 1 to 10" block from the Green Operators Tab, and switch it from 1 to 10 to 0 to 360.
Hint: show image
4. Include Repition
Hint: show details
Place a “repeat 10” loop below the random angle code, then switch 10 to 15. This will help move us away from the "Target" sprite.
Hint: show image
5. Add a Move
Hint: show details
Place a "move 10 steps" to the “repeat 15" loop. Change 10 steps to around 6. This just makes the particle move less far. What's wrong if we test it?
Hint: show image
6. Fix the Remaining Particle.
Hint: show details
Tack on a "hide" block to make the particles go away after they move. How about we improve the looks by adding more particles.
Hint: show image
×
×
Provide your email address for immediate project access
Email
Check your email for instructions on how to create a full DA account