Enemy not generating at right position

Hi I’ve been developing a arcade prototype. Here enemies are supposed to generate out of screen and move towards designation but it’s generating inside screen and looks weird. Please help.

Please help me on this, Is anyone watching this?

print your screen and post.

Do you need the events part or the preview part?

events part to see your code.


Got any ideas?

Instead of Random(2000)-500
use RandomInRange(1500,2000)

use this type of code for each create object.

Hi I tried it but enemies are still spawning on screen. Do I need to modify anything else? Should I do the same to both X and Y axis?

What’s your screen size? Where do you want enemies spawn? Anywhere outside screen?

1920*1080 and enemies are to be spawned outside of the screen, just at the edge.

What’s your enemy size?

123*131 is the enemy size. Is there something wrong?

Create object enemy at position -150;RandomInRange(0,1080)
Create object enemy at position 2000;RandomInRange(0,1080)
Create object enemy at position RandomInRange(0,1920);-150
Create object enemy at position RandomInRange(0,1920),-1200

1 Like

Try this, and don’t forget to put Trigger once, otherwise it will create multiples enemies.

Trigger once?

Z how do I do that? Sorry if I’m asking stupid questions.

-150 is the x position, so the enemy will be created left side of screen

on the left side where you are creating enemies add a condition “Trigger Once while true.”
It’s under advanced menu

I did that but still some enemies are spawning within the screen.

Better you upload your project and post the link for download.

How do I do that? Is there a website for it?