Falling Enemy Help

I’m trying to make a game where you are a shield protecting earth from meteors, but I dont know how to make the meteors appear randomly. Could I have some help with this?

Hello @H_1q , welcome to the forums!

To make the meteors appear randomly, you might wanna have the computer generate some random numbers for you. Here’s how to get a random number:

// random number from 1 to 100 
random.integer(1,100); 

You can use that to give the meteors a random position like this:

// Give this object random X and Y value
this.x=random.integer(0,project.width);
this.y=random.integer(0,project.height);

Then you can add in more to the code to make it fit in your project.

If you’ll need any help with that, just let me know :)