Checking if a File Has Been Saved

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • 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

  • 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

    Edited once, last by MrXkill (February 10, 2012 at 12:40 AM).

  • 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

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!