How do I use "If Exists.." ?

0 favourites
  • 5 posts
From the Asset Store
Adblock Detection
$2 USD
80% off
Detects any kind of ad blocker. Very easy implementation into already existing projects
  • I am attempting to use the local storage action to check if something exists and then "if exists" add something to a drop down menu.

    I am telling the action to check for "NWJs.Appfolder&Save1.txt" but it doesn't seem to be working correctly. Is this the correct format for the path in regards to if exists actions?

    If not i would greatly appreciate any advice; if it is, i must be doing something else wrong but at least i can rule this out.

  • i think you are having a confusion here , local storage is not your files and folders , local storage is like a dictionary ( a register ) but the values are saved in a browser session so the next time you run the game the values are still there, and it is used for saving high scores, user data, etc . it has nothing to do with files and folders.

  • you can do this alternatively

    like

    if score is greater than 0 then do anything

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • i think you are having a confusion here , local storage is not your files and folders , local storage is like a dictionary ( a register ) but the values are saved in a browser session so the next time you run the game the values are still there, and it is used for saving high scores, user data, etc . it has nothing to do with files and folders.

    Hi, I now realise this is saving values rather than files. I have attempted to save a value to SaveFile.AsJson and then on start up check that the value exists and then to add something to the drop down menu.

    Is there a way to use Ajax to determine if a file exists or not?

    Thanks for the advice

  • you can do this alternatively

    like

    if score is greater than 0 then do anything

    I'm not too sure what you mean.

    The basic idea of what i want to do is:

    1) Be able to save a set of words in a text file and also save the sets name defined by the user. (done)

    2) Be able to change the drop down menus names to what the person has named it.

    3) Dont show the save slot on the drop down if no set has been saved in that slot.

    Thanks for the advice

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)