Howdy, Stranger!

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

Display text when clicked, don't switch passage

edited April 2017 in Help! with 1.x
Hi, I'm looking for a function for Sugarcube 1.0.35 that works like the Harlowe text as follows:

There is a (link: "sword.")[sword. It is big and looks like it could take somebody's head off.]

In other words, it initially displays just 'There is a sword', but when clicked, it elaborates on this information. As far as I can see, there's not an equivalent, but it's likely that I just missed something obvious. Any help?


  • edited April 2017
    Try <<linkreplace>>

    Nevermind, you wanted a SC 1.0.35 solution. I can't read.
  • Please use the code tag when posting examples - it's the C on the editor bar.

    The solution is fairly simple:

    1. Use a HTML span element with an ID to mark what you want to be replaced.
    2. Use a <<replace>> macro to replace the marked content with the new text.
    3. Use a <<click>> macro to allow the user interact with the story.

    The following does the above:
    There is a <span id="sword-link"><<click "sword.">><<replace "#sword-link">>sword. It is big and looks like it could take somebody's head off.<</replace>><</click>></span>
Sign In or Register to comment.