Page 1 of 1

Where is the save vars and load vars demo?

PostPosted: Sun Nov 03, 2013 9:30 pm
by knucklecrunchgames
In my game you can save the game, but I don't know how to do that? has anyone got a ged to explain it or a tutorial. I have searched the forums for one but couldn't find one


thanks Knuckle Crunch Games :)

Re: Where is the save vars and load vars demo?

PostPosted: Sun Nov 03, 2013 10:27 pm
by DarkParadox
saveVars(); is a function that lets you save a group of variables to a file.
When adding a variable using the script editor interface, you type in a "save group" like this one:
Image
You can add as many of your variables as you want of any type to the save group.

Then, when you want to save these variable's values to a file, you use:
Code: Select all
saveVars("filename", "SaveGroup1");


The next time you use the code loadVars("filename", "SaveGroup1"), the variables in that group will be set to the values they had when the file was saved.

Back in my other DLC demo I made for you, I used a variable I made that was an array, and saved it using saveVars() in different states.

Re: Where is the save vars and load vars demo?

PostPosted: Tue Nov 05, 2013 3:44 pm
by knucklecrunchgames
DarkParadox wrote:saveVars(); is a function that lets you save a group of variables to a file.
When adding a variable using the script editor interface, you type in a "save group" like this one:
Image
You can add as many of your variables as you want of any type to the save group.

Then, when you want to save these variable's values to a file, you use:
Code: Select all
saveVars("filename", "SaveGroup1");


The next time you use the code loadVars("filename", "SaveGroup1"), the variables in that group will be set to the values they had when the file was saved.

Back in my other DLC demo I made for you, I used a variable I made that was an array, and saved it using saveVars() in different states.


Thankyou paradox +1 to you :)