Where is the save vars and load vars demo?

Talk about making games.

Where is the save vars and load vars demo?

Postby knucklecrunchgames » Sun Nov 03, 2013 9:30 pm

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 :)
User avatar
knucklecrunchgames
 
Posts: 1071
Joined: Wed Nov 21, 2012 8:01 pm
Location: In gameEditor.exe
Score: 17 Give a positive score

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

Postby DarkParadox » Sun Nov 03, 2013 10:27 pm

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.
User avatar
DarkParadox
 
Posts: 457
Joined: Mon Jan 08, 2007 11:32 pm
Location: USA, Florida.
Score: 84 Give a positive score

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

Postby knucklecrunchgames » Tue Nov 05, 2013 3:44 pm

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 :)
User avatar
knucklecrunchgames
 
Posts: 1071
Joined: Wed Nov 21, 2012 8:01 pm
Location: In gameEditor.exe
Score: 17 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest