Coin Collection & Enemy Defeat=Next Scene

Hey, this is my first time using Gdevelop and I’m trying to figure out a way how to move on to the next scene by collecting all the coins and destroying all the enemies in the current scene. I know the action to take is Change to next scene but I can’t find any sort of condition to help me with this. Anyone know how to do this?

You could use Number of <coin> objects = 0 and Number of <enemy> objects = 0 as the condition:

Mr…You are the G.O.A.T!

1 Like

Do you mind if I ask a couple more questions?

That’s what my kids tell me when they want something.

Aha! :smiley:

Fire away. I may not be able answer immediately, but I will answer if someone else doesn’t first.

How do I get my character to respawn if they fall off screen or at the very least make sure they don’t go outside the boundary at all. Also when I preview the screen it shows the outside boundary as well and not just what’s inside, know how to fix that?

You can place a new sprite (call it boundary?) along the bottom, just below bottom of the scene, and when a collision occurs between the character and the boundary sprite then respawn.

As for seeing outside the boundary - there’s a rectangle on the editor screen that denotes screen boundaries. Make sure your boundaries match it. Either that, or change your game resolution under your project properties to match your scene size.

Ok, thanks for the help