AYUDA

hola, estoy trabajando en un juego de plataformas en game maker studio 2 e hice un sistema de guardado de progreso. Cada vez que completas un nivel, se ejecuta el comando game_save () y regresas a la pantalla de selección de nivel, con el siguiente nivel desbloqueado. Y cuando cierres y vuelvas a abrir el juego, en la pantalla de inicio habrá un botón para ejecutar el comando game_load () y será enviado a la pantalla de selección de nivel con los niveles desbloqueados hasta el momento. Todos los niveles están programados de la misma manera. Aunque en los niveles de jefes al final en lugar de la meta hay un botón que al hacer clic en él hará la misma función que la meta, volver a la pantalla de selección de nivel y guardar el juego. Pero en un cierto nivel, el nivel 17, que viene después de una pelea de jefes, cuando se ejecuta el comando game_load (), va directamente a la room del nivel en sí, y no a la pantalla de selección de nivel. Me llamó la atención ya que no hay cambios en los comandos y los otros niveles funcionan bien. El problema se repite en los siguientes niveles, al cargar el progreso vas a la sala del nivel 17, y no a la pantalla correspondiente, se carga el juego, pero vas a la sala equivocada. el problema pasa de forma aleatoria, es decir, a veces pasa y a veces no, pero casi todo el tiempo ¿Pueden darme una solución por favor? Gracias.
 
hi , i am working on a plataformer game in game maker studio 2 and made a progress save system. Every time you complete a level, the command game_save () is executed and you return to the level selection screen, with the next level unlocked. And when you close and reopen the game, on the home screen there will be a button to execute the game_load () command and it will be sent to the level selection screen with the levels unlocked so far. All levels are programmed the same. Although in the levels of bosses at the end instead of the goal there is a button that when you click it, it will do the same function as the goal, return to the level selection screen and save the game. But at a certain level, level 17, which comes after a boss fight, when the game_load () command is executed, it goes directly to the room of the level itself, and not to the level selection screen. It caught my attention since there is no change in the commands, and the other levels work fine. The problem is repeated in the following levels, when loading the progress, you go to the room of level 17, and not to the corresponding screen, the game is loaded, but you go to the wrong room. the problem happens Ramdomly, but almost all the time. Can you give me a solution please? thanks.
 

FrostyCat

Redemption Seeker
Data produced by game_save() no longer works after you change any detail of your project. This is why you should not have used it.

Look up how to use other means of file handling (e.g. JSON, buffers, text files, INI files, etc.), and re-build your save system with that.
 

Joe Ellis

Member
Saving a game is a hard subject to manage, especially when you thought you could just use game_save()
Plus there are soo many different ways you could do it.
We can discuss it further though and it won't be too hard to do in your case I think, it'd just be simple writing a few things to a text file or binary, whichever you prefer.
 
Top