change scene ... and the Player?

I want to make a game for training in mathematics for pupils in primary school. The global idea is: The kids have to touch the correct object-tasks(e.g.17-5) in scene01for the solution =12 and(e.g. 9+6) in scene 02 for the solution =15 and so on. If they touch a wrong task, they loose a life. At the bottom of the scene is always the job to see.
Now I make scene01 with three external events: PlayerManagement, CameraManagement and ObjectManagement. I link the Scene01 with the external events. I link scene02 with scene01. All the Variables are global variables. In scene01 there is a layer for the tasks1. Then I test scene01… it works fine. Luckily there is the possibility to copy the scene. I do this by rightclick and rename the copy of scene01 in scene02. I delete the layer with the tasks1 and add a layer with tasks2. I test scene02 … all works fine.
When the pupils have reached 5 points, the scene 1 should change to scene 2. For testing I set the limit to 1 point. I test scene01, by reaching 1 point there comes a hint: in the compiled game now scene01 will change to scene02.
I compile the game and test it: scene01 works fine, it changes to scene02 … but then it doesn’t work. The Player doesn’t walk, he only flips horizontally, when I press left or right. Also the action at the beginning of the scene „flip horizontally Player : yes“ doesn’t work.
It is said: the error is always in front of the monitor. But I cannot find it. :confused:
If you want to take a look at the project you can download it here: GDevelop_Mathespiel1.zip (2.14 MB)

(Thank you Google, to help me with the translation :slight_smile: )

Found it!
When you get a point you switch from scene 1 (Szene01) to scene 2 (Szene02), this code is in the “PlayerManagement” external event. The problem is on the scene 2, you link the same code (PlayerMangement), so you keep switching from scene 2 to scene 2 over and over again. You should copy the scene switching code into every scene, since every scene needs a different value in the scene to switch at. And don’t link all the events, or you’ll copy the events to switch to any scene from any scene :slight_smile:
Here is a “fixed” example, so you can check it:
Mathespie4_02.gdg (351 KB)
:exclamation: It’s an example because I’ve deleted some missing images from the project too, make the modifications in your full project, don’t use this one.

The only difference is that I put the code to be linked from the scene 1 (the code useful for other scenes) in a big group called “To Be Linked By Other Scenes”, the code to switch scenes is outside this group. And deleted the code to switch scenes from the PlayerManagement external event :slight_smile:

First I don’t understand all, then I made a mistake, and now:
IT WORKS!
THANK YOU SO MUCH! :smiley: :smiley: :smiley: