Hello,
I am currently using Harlowe on Twine 2.
I have a story with a cover page that works as a start screen.
The page has the following options:
"New Game"
"Load Game"
"Achievements"
"About"
I am having trouble with the "Load Game" option: I would like it to only show up if a saved game exists.
If a saved game doesn't exist, I would like it to appear as greyed out / unclickable text.
Right now, my code for loading a game looks like this:
[Load Game]<restore|</li>{(click: ?restore)[Done!(loadgame: "A")]}
And for saving it is:
[Save]<save|
{(click: ?save)[Done!(savegame: "A")]
And I would think this issue could be easily resolved with an if:/else: statement, ie: if a savegame exists, show the code above; else show plain text.
I can't, however figure out what to put in the if: clause.
Note: I haven't figured out the Achievements yet, but I'll most likely open a new thread for that soon.
Comments
I used the example greyelf mentioned with color like this:
I have also been toying with achievements infrastructure so I might have a few insights when you open your thread for those!
Hi! This is what I've been using, but I am still seeing the error.
Since both @greyelf and @Ceadda confirmed that this is how it is supposed to work, I tested it out in different browsers and realised this is working perfectly except for internet explorer.
I thought it was my fault before because I used IE as an alternative browser to check when there is no file.
I have attached a screenshot of what I see.
Blink-based browsers (Chromium, Chrome, Opera) also disable various things, or simply make them crash, for files which are opened via file://.
Shoot. You are right! I am an idiot!
Thank you.
This is an interesting subject, and I agree with you on principle, though I don't necessarily agree 100% with the way security is enforced right now.
I think that it should be much more transparent to users what is being done to protect them, and that with so many services now collecting user data for profiling (and for profit), runing a html page locally seems like a much smaller issue.