Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Can nested (link:) and (goto:) macros clear the page like (link-goto:) does?

There's an apparent asymmetry between (link: "xxx")[(goto: "yyy")] and (link-goto: "xxx", "yyy") in Harlowe 1.0.1. The latter clears the page, while the former doesn't.

I'd like to be able to set variables based on which passage link someone clicked, and the most straightforward way to do that is:

(link: "by way of the forest")[(set: $took_forest_path to true)(goto: "village")]

But since that doesn't clear the page, the links look different. I've got a super-hacky workaround for now, but is there a way of clearing the page in a nested link/goto combination the way a link-goto macro does?

Comments

  • I tested the following using both Firefox and Chrome on Windows and both links behaved the same, they both resulted in the text shown in the Start passage being removed and replaced with the text from the yyy passage which is what I believe you mean when you say "clears the page"

    (note: using TWEE notation, lines starting with two colons indicate a new passage, text on same line as the two colons is the new passage's title.)

    :: Start
    This is the start passage.
    A link with a goto: (link: "xxx")[(goto: "yyy")]
    A link-goto link: (link-goto: "xxx", "yyy")


    :: yyy
    This is the yyy passage.

    Which browser (brand, version, 32/64bit) and operating system (brand, version, 32/64bit) are you seeing this issue on?

    Do you see the issue when using all three Test, Play and Publish to File versions of your HTML file?
  • Aha, this was all my fault: I had some custom Javascript that was interacting poorly with Harlowe. Teach me to test in a clean environment!
Sign In or Register to comment.