Proto Dan Posted March 14, 2014 Report Share Posted March 14, 2014 Okay, so I want to know how to make a simple save game feature using Multimedia Fusion 2. Basically, every time you finish a level, I want the game to save automatically. Next time you open the game, it will skip to the level you were on most recently. None of the tutorials I found on YouTube (or anywhere, for that matter) really helped me. I'd really appreciate it if someone here could. Link to comment Share on other sites More sharing options...
GSF Posted March 15, 2014 Report Share Posted March 15, 2014 You have several methods of saving data in MMF2. For small amounts of data, .ini files (encryption optional) are more than enough. If you manage more data, then an array would be better suited. The logic behind this works as follows: INI files have groups and items on them. A group can contain several items inside. With the ini object, what you want to do is write the frame of the level you're in (use get frame number expression) to an item, e.g. CurrentFrame. This item can be set as part of the SaveData group, along with lives and other variables. Finally, you write the file to disk. The following expression will save the file inside a "save" folder in the game's directory: appdrive$+appdir$+"\save\data.savTo load data, load the file through the ini object when the frame starts, and check if the saved value is different than 0. If it's not 0, then jump to the specified frame according to the file. If the value is 0 (or nonexistent), then proceed with a new game. I think I had an example of this method lying around somewhere. I'll look for it and post back later. 1 Link to comment Share on other sites More sharing options...
Recommended Posts