hey i have a menu.blend and a game.blend… in game you are able to save and load the game… but i dont want every time start new game and then pressing key to load the game… is there any way to run from menu.blend the game.blend with parameter? like: “game.blend -load”
1 word: Python
yes i know the basics of the python but can i do that? and if i load with the parameter -load how can it understand its the -load or -somethingelse… how can i manage that the -load will do what i want after load the .blend?
not exactly! but if i am thinking what you are thinking,then there is hope
it’s a bad trick!
The trick is to assign a value to the sys.argv variable
import sys sys.argv="-load"
and make sure that this code is executed before the game.blend is loaded
in the other file game.blend
add something like this
import sys print sys.argv
you should be able to see “-load” printed
And that’s it, the argument passed will be stored as array in sys.argv variable and you can list them with sys.argv , sys.argv etc… (i belive the arguments will be stored as multi-dimentional arrays/lists.
Hope that helps!
sorry! for double post:D
heh thank you it’s working now i will go to implement all the needed things