Howdy, Stranger!

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

How to use (live:) behave like a timedgoto with a clicklink? (Solved)

edited August 2015 in Help! with 2.0
I was about to post this as i was stumped and then from another thread tried something else and got it working.
So I decided to post this anyway for others who want to do the same thing involving click links and can't get it working.

What i want to do is when the clicklink is selected show some text before going to a new passage or refreshing passage.

Here is a dummy example:

(if: $VarX is 1 and $VarWhatever is 2)[
[Click link text]<ClickMe| (click: ?ClickMe)[(live: 5s)[(goto: "passagename")] Display text...(Set: $VarSomething to "something")(live: 4s)(goto: "passagename")]]

Comments

  • There are a couple of errors in your example, and maybe in your story if you copied the example from it.

    1. The 4 second (live:) macro is missing it's associated hook/container so the (goto: "passagename") following it is actually part of the (click: ?ClickMe) and will trigger as soon as the Reader clicks on that lick.

    2. The example has two (live:) macros (one at 4 seconds and the other at 5 seconds) both sending the Reader to a different passage. and the 5 second (live:) may not trigger depending on how long the 4 second (live:) event takes to transition to the new passage.

    Try the following:
    (if: $VarX is 1 and $VarWhatever is 2)[[Click link text]<ClickMe| (click: ?ClickMe)[Display text...(Set: $VarSomething to "something")(live: 5s)[(goto: "passagename")]]]
    
    ... the above reformatted/indented to make it easier to read:
    (if: $VarX is 1 and $VarWhatever is 2)[
    	[Click link text]<ClickMe|
    	(click: ?ClickMe)[
    		Display text...
    		(Set: $VarSomething to "something")
    		(live: 5s)[(goto: "passagename")]
    	]
    ]
    
  • Thanks greyelf. Looking at my actual code i used which works and my dummy example, i see messed up the example big time, Sorry about that. (mental note: don't post when tired). So thanks for correcting that as well as the reformatting example.
Sign In or Register to comment.