User Tag List

Results 1 to 4 of 4

Thread: How to detect the presence or lack of an array file used for saved games?

  1. #1
    Clicker Fusion 2.5
    Jocastus's Avatar
    Join Date
    Jan 2008
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to detect the presence or lack of an array file used for saved games?

    I've designed a saved game system for a metroidvania I've been working on. There are three game slots, each of which saves its data to its own array files. The problem is I don't know what to do when A new player sets up the game for the first time before those files have been created.

    Is there a way to detect whether those files exist, so that a new game will be started if they are not found? I haven't yet found an answer to this issue. Perhaps I'm coming at the idea the wrong way? If you are aware of a better way to handle new game saves, please let me know.

    Thank you.

  2. #2
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you check for a value that you know should be in the array file (for example, if you set the player's health to 100 upon creation and you know it would never be 0 if the file was there), you could check for a value being blank or zero - I think this is how the Array object handles missing files. Otherwise, you could use the File object to explicitly check for the existence of a file.

  3. #3
    Clicker Fusion 2.5
    Jocastus's Avatar
    Join Date
    Jan 2008
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, David, I'll give it a go.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    rubes's Avatar
    Join Date
    May 2011
    Posts
    363
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I was thinking about the file object, too, but i really like the simplicity of checking a value that you know should not be 0. Excellent idea David

Similar Threads

  1. Any way for me to view an Array file saved out from MMF2 to check the data?
    By BrashMonkey in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 14th January 2015, 12:00 AM
  2. Lack of Extensions Stopping File From Opening
    By Soilydude in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 22nd December 2013, 11:29 AM
  3. Checking if a File Has Been Saved
    By MrXkill in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 9th February 2012, 11:57 PM
  4. Detect level info from Array or Collisions?
    By Bipolar_Games in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 3rd March 2011, 08:58 AM
  5. présence de pub
    By 123 in forum The Games Factory 2 - Technical Support
    Replies: 1
    Last Post: 2nd October 2008, 03:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •