The Daily Click ::. Forums ::. Misc Chat ::. I need some Help for the INI file for TGF.
 

Post Reply  Post Oekaki 
 

Posted By Message

Deleted User
20th February, 2006 at 21:57:10 -

Ok I need some one to tell me how to Save a game of youre progress and then load it again.

 

David Newton (DavidN)

Invisible

Registered
  27/10/2002
Points
  8322

Honored Admin Alumnus
21st February, 2006 at 09:38:47 -

INIs are simple files arranged in groups like this:

[Groupname]
Item1 = 94
Item2 = Sporks
Item3 = Effervescence

You need to know what specific values you need to save to make a save game (Player's health? Location on screen? Level number? Apple pies collected?), then set the File of the INI object to "./[filenamegoeshere.ini]" at the start of the frame. When you need to save, repeatedly do these:

Set item of INI to "[Item name]"
Set item value of INI to [Item value]"

until all the values are saved. To load, you need to repeatedly set the item and set a counter or value in your game to the value of that item.

Using an INI extension or MMF makes things a bit easier, as the switching of items/loading are combined in one event.

 
http://www.davidn.co.nr - Games, music, living in America
   

Post Reply



 



Advertisement

Worth A Click