Game Menu/Load script

I have made a game menu and everything works, introduction, new game, exit, but I want to load a saved location. I am using a save/load script I found. The scripts work, but I can’t figure out how to load the previous saved location from the menu. I have three scenes in the game. Thanks! :expressionless:

Just attach a message actuator (saying ‘load’ or something) to the same menu item that is changing the scene, then attach message sensors to all the objects that you want moved. Link these to the load part of the script, then when the scene loads all the objects will move to the saved position.

jrt

Thank you!

On thinking about it you don’t even need the messages, you could just attach an always sensor to each object with the pulses off (this will just activate once) and link this to the script. Then when the scene loads they will moved to the saved location automatically.

jrt.

What about if I have multiple scenes?

running at once?

iirc messages are sent to all running scenes, you can send it from one to another

I have three scenes in the game. I linked the message sensor that calls the first scene. I have two other scenes left to link. Those scenes (one at a time) load when the player triggers something.

It would depend on what you wanted to happen when the scene loads.
Perhaps if you could explained a little about the game maybe someone could suggest how best to link it.

jrt.

Sure.
It is an adventure game. The player walks through the first scene, a cutscene plays. At the end of the cut scene a new scene loads. When the player solves a series of puzzles, a new scene loads. This third scene allows the player to travel back through the entire level. I can’t link all of the scenes together at one time because the entire level will be accessible. I’m trying to solve this without a script. Thanks for anyone’s help.

If you want your character to carry the knowledge or items that
he’s gained back through the other levels, the objects that hold
the information will need to exist in those levels and have the
load script attached with a trigger that activates when the scene
loads.

The only problem with this is whatever information was in the saved
files would load the first time the scene opened. It might be
better to make a duplicate of each level and set them up as you
need them.

Of course the information will have to be saved in the scene you’re
leaving before it closes. If your game gets too big you could
always split it into separate games and load the next one from
inside the first. As long as they’re in the same folder they should
still access the same information.

Depending where you want your character to be in the previous level
will govern whether you use the saveload script on it.

jrt

Thank you very much, jrt. :smiley: