between scenes

hi all. i got question - how to make so, that i would save my data between scenes? is hard to understand for me that. python allowing.
please make a simple .blend file. i need that really much http://forum.nystic.com/images/smilies/icon_e_smile.gif

sorry i am not sitting at home or i would have defeniately prepared a blend file to you but still i think i can help u a little.

1.try this link:-

http://blendenzo.com/tutSaveLoad.html

it it is very good tutorial for the same purpose.

  1. do somthing like when you have to save the scene suppose ur making a ball game and you want the data to saved when ur ball touches the point then with the touch sensor that u will use to change to another scene connect a python controller of executing script save.py

saving takes very little time (so short that u will not be able notice it) unless u really have large chunks of data.

i believe ths should be the solution to ur problem :slight_smile:

GameLogic.globalDict[‘name’] is your best friend in this scenario. use it as so

GameLogic.globalDict[‘health’] = me.health to SAVE the properties of health into the variable ‘health’ which is then store in the global dictionary, just make sure to add a game actuator that Saves GameLogic.globalDict

To load is fairly simple as well it’s just the inverse
me.health = GameLogic.globalDict[‘health’]
Just make sure you have a Load GameLogic.globalDict actuator set.

The tutorial posted is good, but that’s to actually save the game. In your case you want to just have the Scene saved proporties to another one when you switch over, and doing it with the saveload tutorial posted probably is to much work for a simple task as that. But choose what ever you are comfortable with.

ty all for answers! i see its complicated, but i will work hard to learn both examples fully.
Chaos_Theory, maybe u got example in blend file? i am not so experienced to do that, dont know what else i must do that it would work :slight_smile:

Here’s a good example, put a few more examples in that. Just put them in the same folder and it should work. Ask me questions if you need to ^.^

Attachments

exampleglobaldict1.blend (109 KB)exampleglobaldict2.blend (111 KB)