Beginner question: Connect (link: "Click to continue")[== links with other macros

Twine Version: 2.3.15
Story Format: Harlowe

Hi there

Totally new to Twine and finding my way around it. One thing, though, drives me insane, because I can’t figure out the correct formatting and I don’t seem to be able to find any answers online.

Basically, I want to work with passages that reveal their text step by step.

The (link: “Click to continue”)[== macro is nifty for that end, because it reveals the rest of the passage (or the rest up to the next link of the same type).

However, I cannot figure out how to combine this with other macros.

Specifically, I’d like to add a delay and a fade in-effec. With a different type of link, the following would work:

(live: 1s)+(t8n:"dissolve")+(link: 'Link')[==

Not here, though, the link just… sits there. It’s not possible to use square brackets, either. So… generally asking, how do you combine this macro with others? And more specifically, how do I do get the effect I’m looking for?

Thank you so much for helping out!

The (transition:) macro’s documentation references the (transition-delay:) macro and the (transition-time:) macro, both of which can be used to alter the timing of a transition effect. The 1st controls the delay before the effect starts, and the 2nd controls how long the effect lasts for.

Try the following combination of macros instead…

(t8n: "dissolve") + (t8n-delay: 1s) + (link: "Try me")[==
Worked!

Thank you so much for reply, I can definitely use this in my stories!

However, I just realized that I was not very precise in describing the problem at hand: The code you posted does delay the transition, not the link text itself. However, what I am looking for is a piece of code that allows for a (link: "Try me")[==-style link to turn visible after a certain time – basically, a timer, as described here.

The (live:) macro, in combination with the (stop:) macro, would be the obvious solution, but there’s one problem: The macro asks for a hook, but you cannot include [== in a hook, it seems – once you close it with a square bracket, the link does not function anymore.

Edit: Well, it wouldn’t work with a passage link, either, come to think of it – I do get the error message “I currently can’t attach (live:) or (event:) macros to commands - only hooks.”. So I figure that it can’t be done with the (live:) macro at all.

Are there alternative ways to do this: Namely, make a link / command – be it [==, [[Link to new passage.->NewPassage]] or any other kind – appear after a definite amount of seconds / microseconds?

As I said, it’s maybe a very basic thing that I do not get – I apologize for not being able to figuring it out myself. (Needless to say, I’m very new to Twine.)

Thanks either way!

Try
{(live: 5s)[(either: “[[Pasage]]”, )]}

One major issue with that linked article is that it doesn’t mention or make use of the (stop:) macro until the 3rd method it describes. Where as (stop:) should generally be used in the body of most (live:) macro calls, unless you specifically want the contained code to be executed repeatably until the next Passage Transition occurs.

Another major issue is the “because refreshing the text doesn’t actually do anything” statement made in Method Zero, because it is wrong.

Each time a (live:) macro executes the content of its associated it updates the Document Object Model (DOM) of the page, which causes any macros or features that monitor for DOM changes to “wake up” so it can determine if that change is something in needs to react to. One such macro is (enchant:).

But on to the real purpose of this post…

The following delays the appearance of any link that is added to the Page, including those added after the (enchant:) macro was executed.

(enchant: ?link, (t8n: "dissolve") + (t8n-delay: 1s))

(link: "Try me")[==
Worked!

note: I generally advise using the (change:) macro over the (enchant:) macro whenever possible, but in this situation the fact that (enchant:) monitors for changes made to the Page’s DOM works in our favour instead of against us.

Thank you so much. I’ll read the linked source more critically in the future. Thanks also for the code, it does indeed work – the (enchant:) macro was new to me, I’ll study how to use it properly based on your explanations.