User Tag List

Results 1 to 4 of 4

Thread: Checking if a File Has Been Saved

  1. #1
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jan 2011
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Checking if a File Has Been Saved

    I was working on a game, and I was wonderinf if there was a way to check to see if a file is on the user's hard drive. I would like the game to know if the user has a save game, or if the game needs to create one.

    Thanks,

    Mrxkill

  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Use the File Object's condition "Name Exists" in condition with "Name is a File" (so as not to detect folders)
    Working as fast as I can on Fusion 3

  3. #3
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jan 2011
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks LB! I just have a few more questions:

    First, What should the name be? Should it be the file name I want to check for, or its name and location?

    ie "savegame" or "appdrive$+appdir$+'savegame'"


    Also, should I put the file extension in the name too?

    ie "savegame.ini" (I probably will not use ini files since they are easy to edit, but hypothetically)

    Lastly, how do I do the opposite statement. What if the file does not exist?

    Thanks again,

    MrXkill

  4. #4
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    1. You can use either relative paths (same directory: "my file.txt" or ".\my file.txt", subdirectory: "Saves\my file.txt" etc...) or full paths ("C:\Program Files\My Game\Saves\my file.txt"), and it doesn't matter.

    2. A file name includes the extension. The "extension" of a file is just an abstract concept of 'that text after the last dot' and is not separate from the file name.

    3. Just right click on the condition and choose 'Negate' like with all negatable conditions
    Working as fast as I can on Fusion 3

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. IOS saved data help
    By amaire13 in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 8th September 2012, 08:11 PM
  3. Transfering saved INI values to INI++?
    By gamer123 in forum Multimedia Fusion 2 - Technical Support
    Replies: 15
    Last Post: 12th April 2012, 02:41 PM
  4. Fonts not saved
    By Evilized79 in forum iOS Export Module Version 2.0
    Replies: 6
    Last Post: 12th April 2012, 02:10 PM
  5. Saved Files
    By Carter in forum The Games Factory 2 - Technical Support
    Replies: 2
    Last Post: 6th February 2011, 09:17 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
  •