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).
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
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.
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.
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 – >
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.
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.
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.