How do I get my player character to move from one scene to another?

Pardon my noobiness, and I did search for an answer to no avail…
I have a game that has multiple scenes and multiple blend files.
How do I get my player character to actually “walk” from one scene to another or from one blend file to another?

Just FYI:
My simple character is currently made up of two objects; a cube and a camera for eyes. I am using logic bricks for the Player (cube) movement (WASD) and a python script for eye movement (camera).
The Player is the parent of the camera (eyes).

You can’t.

The 3D objects (with it’s logic) reside in it’s scene only.

When you switch scenes, they get destroyed with their scene and you get new objects with the other scene.

So I need to have my player character and HUD linked or appended to every scene/file?
And bring in the logic and scores/inventory via a storing system?
I apologize…I’m a bit lost here…

Just link them to the next scene. but u will have to expect that all properties u have on things will go lost. U need a small function that keeps those values (python) if ur HUD is an overlay scene, do nothing to it

sent from my LG 3D Optimus

thanks so much!

in this case, using scenes as levels, I would keep all my points, scores, pickups, Text properties, save/load, and levelmanager on a separate scene.
Then always (TAP or it will throw an error) add it as an overlay, to every (level) scene. That way when you move from scene to scene, your points etc. stay. The save/load will save them to a text file, so when you quit the game, then start it again you have all your point, scores, and stuff.

+This thread.

I`m needing to do this myself, as i will have numerous scenes.

Two solutions:

  • Link your character into every scene and store the information in the globaldict or an overlay scene.
  • Libload/free a blend containing the scene.

Which is easier? Probably the first one.

I am going to go with Link my character and store and restore the information. At least for moving my player from one scene to another.
The whole idea of linking makes more sense to me than loading a whole scene on my character. :slight_smile:

Hi- I’m also a newbie having a similar issue. How would I link my character? Would I have to copy the same character into the scenes?

Please let me know five, if you get it working good :slight_smile:

mega tip right here: if you are in a condition where yous trying to transfer objects between scenes, reconsider what you can do to make everything happen in once scene – >

answer:

delete and spawn levels as objects

I threw these blend files together to show how us non-programers can copy properties between scenes, and change scenes(Levels) when a certain score is reached. It’s just a simplified version, yours will be more complex. The script are available in resourses.

https://www.dropbox.com/s/j3jjdx55feku4ac/saveload%20scenes.blend?dl=0 press the up arrow key to increase your score, Quit and restart this and the score is saved. when it reaches 20, it will change scenes (Levels). Quit the game, restart and it goes to the last level.
It saves a BGECONFIG text file in the same folder. Move it to a different PC and it still works.

Thanks to Cotax for the save/load script, you may choose to write your own or use a different one.

https://www.dropbox.com/s/wer0bj7e0jxp9uy/properties%20score.blend?dl=0

the one above copies properties between scenes. Hit the spacebar to increase the score. Quit game restart, score is still there. Notice it is copying properties between scenes.
Speacial thanks to the person who wrote this script.

This is how I do all my little games. The kids who play them don’t care how it works. As long as it works.
:slight_smile:

Hint: you can copy and paste objects from one scene to the next. Select the object(s) ctrl C to copy,
move to next scene, ctrl V to paste.

Hope it helps

theoldguy…
Thanks a lot. Those scripts are pretty simple and will be an enormous help!

Did you really get your question answered?