Menu Question

Game Editor comments and discussion.

Menu Question

Postby rudyj » Sat Aug 29, 2009 4:11 pm

I am working on a game and I was wondering if I could get pointed in the right direction. When my game loads I would like it to check to see if a playername has been saved. I am assuming I would do this with savevars. If their is nothing in the file I would like a input sceen to come asking the player to enter one. Or if someone could point me to a tutorial on saving vars to a file and loading them that would be great also.
rudyj
 
Posts: 17
Joined: Tue Jan 20, 2009 4:46 am
Score: 0 Give a positive score

Re: Menu Question

Postby zygoth » Sat Aug 29, 2009 5:04 pm

Saving and loading variables is pretty easy. When you create the variable in global code, make a name for the save group you want it to be in. Then use the saveVars; function to save all the variables from the selected group into a data file with the name you enter. Use the loadVars function to load all the variables from your selected group from your selected file. Note that you must have the same named groups and variables created in each file. The loadVars function sets all the variables in the group you select to the values stored in the file you load from.

Hope this helps

Zygo
Nova: 100% Vertigo/Mazeman: 100%
Visit my website to download them both! http://www.ketonegames.com
User avatar
zygoth
 
Posts: 140
Joined: Mon Jun 11, 2007 6:37 pm
Score: 5 Give a positive score

Re: Menu Question

Postby rudyj » Sat Aug 29, 2009 5:57 pm

Thanks! Any idea on how to create a Dialog Box? For input
rudyj
 
Posts: 17
Joined: Tue Jan 20, 2009 4:46 am
Score: 0 Give a positive score

Re: Menu Question

Postby Hblade » Sat Aug 29, 2009 6:00 pm

Make a character, then click on "text", then clic on Text Input
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron