Python - How to use collision and go to next scene?

I want to go to the next scene after the camera collides with a specific object.

Hi @Medard,
This can be done by defining a function that checks the collision (to see if the colliding object is the camera or vice versa), with if it is: space.go_to_scene(1),
then using BaseItem.on_collision_enter(collisionCheckFunction).
The on_collision_enter will feed the colliding object as parameter into the function that it calls.
(Also you can use “space.go_to_next_scene” to actually go to the next scene instead of a specific one).
Anyhow here’s a mockup as I might not have explained it very well:

Hope to have helped!

P.s. I like the games you’ve made in coSpaces, they are very nicely made and fun to play!

1 Like

Thank you for your answer and prepared application. Now everything is clear. I am sending an application with control code to animated objects.

1 Like