Indicators for every asteroid

Hi guys!

I’m working on a game similar to the classic Asteroid game.

I created 4 indicators (up, down, left, right) that are created with the creation of the asteroid in the appropriate part of the screen (if the asteroid created in the upper part of the screen and goes down, the indicator appears at the upper edge of the screen till we dont see asteroid).

The problem is with two or more asteroids flying from the same direction, because the indicator is still one, not two or more.

Can anyone help and possibly explain how the solution works?

1 Like

Hi,
I’m not sure I understood your problem :confused: but I think the answer you’re looking for is: For Each events [GDevelop wiki]

1 Like

What did I do wrong?

Id like to do sth like this →

I want these yellow indicators(right) follow Y of asteroids, cuz X must be next to edge of screen

I made it!
Do u wanna see code?

image

Ah, now that it’s working, I understand better what you meant :sweat_smile:
Glad you got it working. :+1:

Asteroids spawn(4 types, for each side of screen) →

For each instance “name”, for each side →

and it works fine :slight_smile:

2 Likes