7. Meteors

Series

Adding Meteors

We will add four meteor objects. Add a new object called “Meteor1”, and select the “meteor_1.png” from the assets folder.

Repeat the same process to add all four meteors. Then your objects should look like this:

We will use object groups to control multiple meteor objects at once, especially in the events. Create a new object group called “Meteors” and add the meteor objects.

Then you should see:

Hitting meteors

Open the Events tab and copy the condition and the action (Player collision with BulletEnemy), then paste it. Replace BulletEnemy in the condition and the Delete action with Meteors and ensure that IsDamaged is equal to 30.

Add a new condition to detect the collision between Bullet and the Meteors.

Our bullets will be gone when they hit meteors.

Then, add an action to delete “Bullet” objects. In the end, your events should look like below.

Testing out

Before testing out the meteors, we should put some meteor objects on the scene. Drag and drop some meteor items on the scene.

Run the game. Now you can see the meteors on the scene. If you hit some meteors, the player will get some damages.

Next step