Help with Ball re-spawn

Hello! So I’m new to Gdevelop, and codeing in general.
I’m following the tutorials and I got the base of the break out to work, and figured I would try to wander off and try adding stuff. One of the things I wanted to add was a Lives counter. I have gotten the actual counter to work pretty well however I’m unsure on how to spawn a new ball.

What I currently have kinda sucks:

Return key is released ----> create object ball

I first tried parenting it to my Y position condition thing that the tutorial had me make but the key doesnt work.

Any solutions?

please show your events so we will se the problem

what kind of behavior has the ball? maybe is it created but falls off the screen

Its just what the official tutorial told me to do…

There are no “behaviors” attached to the ball, its all in events.

ok for what i cam see i guess you only move one ball, so all spawned balls are all ones over the others.
try adding a force when creating a new ball just to check that is created
If you want to move all the balls on screen you should use a for each ball event

I think we have a miscommunication here.
The ball spawns alright, its just that the player could press enter whenever and spawn a bunch of balls. I dont want that. I only want the player to be able to spawn a ball when the “original” ball fall, or even when “all” the balls are off scre–…
Okay talking to you, I actually just figured it out myself. I talk it out with you and I fixed my issue I think. Thank you!

1 Like

ok, just in case there is an event to count how many objects of a kind do you have, so just check that you have O balls before spawnning