Hi everyone, I’m new here and I just joined this forum because of the game I’m working on. I was working on the different game functions until I got to the save feature. The goal is simple: when the user plays specific scenes, a save is initiated so that if the user decides to close the game or encounters a problem, they can replay from their previous save. Let me explain a scenario so you understand. Imagine a “menu” scene with a “New_game” object. This scene represents the game menu when the user launches the game for the first time. When the user clicks on the “new_game” object, they are taken to another scene, “game_1,” which is the scene for level 1. As soon as they finish level 1, they click on another object, “next,” which takes them to level 2, and so on up to level 4. The goal here is that if, for example, the player decides to close the game while on level 2, when they relaunch the game a second time, a new scene, “menu_2,” will replace the “menu” scene. This “menu_2” scene contains two objects: “New_game” and “Load_game.” Clicking “Load_game” allows the player to replay level 2 from the beginning. This process is the same for the “menu_3” scene, which replaces “menu_2” if the player reaches the “game_3” and “menu_4” scenes. which replaces “menu_3” if the player reaches scene “game_4”. Note that scenes menu_2, menu_3 and menu_4 are identical in terms of sprite and design but have different functions because their “Load game” object allows you to go to a game scene corresponding to their number (you probably understood this) but their “New_game” object has exactly the same function: once clicked, it allows you to play scene “game_1” but it must destroy an old save and create a new one. To summarize, when a player clicks on “New_game” in the “Menu” scene, they create a new save file and then go to “Game_1”. When they reach “Game_2”, the old save file is overwritten by the new one, and “Menu_2” replaces “Menu” as the new home screen. To see this change, the player must close and relaunch the game. The player then clicks on the “New_game” item in “Menu_2”, which does the same thing as the “New_game” item in the “Menu” scene, but destroys the last save file. This is how I envisioned my save process, because I wanted to replicate the mechanics of FNAF 1 and 2. If you’ve played them, you know exactly where I’m going with this. To build this automatic save, I struggled to the point of asking Chat Gpt and the engine’s AI, but the engine’s AI is doing all sorts of things; I’m getting the opposite of what I wanted.
That’s all. Just so you know, the conditions and actions for saving were created by the game engine’s AI, and to see if the game saves automatically, I have to build it every time. There’s been good feedback sometimes, but lately, after building the game, instead of showing me the “menu” scene, it shows me the “menu_load3” scene. I’ve looked at the events, but I don’t understand why. So please, if you have any tips or can find errors in the events and tell me how to fix it, it would help me a lot. And if you agree, please explain step by step what I need to do. My engine is in French, and I’m still a beginner. Thank you for reading.