FINAL EDIT
Here is the solution with a template: This is one way of saving last known XY and Scene information
I can’t delete this thread but I have solved this. I guess…, enjoy incoherent rambling.
After four days of trying to troubleshoot this on the discord, talking to many people, and having a kind user review my own game (which got some results), I still do not have a functioning save/load system for this specific mechanic. A mechanic most rpgs/games have when saving and reloading a game file.
Here’s what I want.
The player needs to be able to save there xy of the scene (and current scene) and I need it to update their xy in the next scene when transitioning. I have this system in place. However, the issue is saving and reloading the scene.
I created a global string var that saves the scene “name”. I gave each scene a specific name.
What should happen is this global var should save the last known scene name and load it back up upon the “continue” menu which then should send you to the scene and xy of the last known save.
I have two separate screenshots of two different games you can access and look through.
Here are the game with the “scene” save function.
removed link
This is the modified game version that a kind user @floop (on discord) worked with me to “fix” the issue.
Here is the known issues
-
The game won’t actually save, often, despite clearly pressing space multiple times and it still revert(s) you back to bedroom scene from bathroom when you open and close and in a different xy or to the default xy of the bedroom.
-
When transitioning between scenes, it will not save the current position of the scene without you pressing space first after entering (that is not how it is intended, it should auto save your XY in the new scene when switching and load you right back to that scene BECAUSE space is used to transition between scenes).
Amongst other bugs. -
I do not personally like using a global var to save player position always, this is my suspicions but I am sure this is contributing to the reason why the player xy is not saving properly, amongst other reasons.
Here is my suspicion(s). I have able to isolate what wasn’t working, which was the scene var never saving period. It resets to the default value given in the game settings not the value given in events upon open/close of the game.
I was able to get some of it working by placing the value of the scene ver underneath “save fille = 0”. Which Is not how it’s suppose to work and it doesn’t always but it’s what gave me semi-decent results sometimes. Like I mention above…
here is all the screenshots with this “save” system:
*Perhaps saving and loading a save file might work here (i have so many doubts of anything working to be honest) but I am literally so tired, i can barely look at this game anymore. 4 days, over 8 hours a day looking at this.
Here is the game without the save/load of the scene.
removed link
Known issues: Obviously, doesn’t save/load scene(s) at all.
What does work: As long as the game is open. It saves player xy perfectly between scenes. It “auto saves” the transition to another scene without having to re-press the space button.
And if I give the global var a default value (in game properties) of one of the scene name(s), it will load back to that scene perfectly. But obviously that is not how it’s suppose to work.
Here are all the screenshots of the no “save” scene game.
*First, I am aware the naming in lower case for the var vs upper case for the actual scene. I fixed this in another save file, it doesn’t do anything of course but I am aware of the poor naming.
Secondly, I do appreciate all the people that tried to help. I am not frustrated at no one except myself. The save/load advance tutorial wasn’t useful here for whatever reason but that could be a just my fault really.
I may just need an example of some one else making this system. I need to see someone else’s code so I can modify to fit the game. I also need this code to actually work, not theorized.
Thirdly, I am more than happy to ditch whatever system I have for a better system. I can care less on maintaining the system format I used, if I need to everything different