Howdy, Stranger!

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

Link-replace but changes more than the linked text?

So, I'll describe my whole situation in Harlowe and maybe someone can work me through it. I'm making a text dialogue where only one line is visible at once, then you click it and it disappears and the next line appears below it. So it's as if all lines are there, but you can only see one line at once. I want to try and do this within one passage if possible (formal rule).

I used link-replace: each line is a link-replace, and its hook is the next line (including line breaks to keep the scrolling going). But this makes the whole line into a link, and if I put link-replace only on part of the line, the rest won't disappear, obviously. I want to put other links on the lines, too. How can I make the link only the last word of the line, for instance? Is there a macro in Harlowe that can delete printed text?

I know there are other ways to do this -- the code would be much simpler if each line is on a separate passage. But it would be ideal if it can happen /exactly/ as I describe.

Comments

  • While I think I get the effect you're going for, I'm not sure I understand the way you want to implement it. Could you give me some sample code that's similar to what you've got?

    To delete printed text in Harlowe, you can use plain old (replace:), and just replace the text you want to delete with nothing.
Sign In or Register to comment.