Howdy, Stranger!

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

Can I make a link that can be clicked multiple times?

Hi!

I would like to create a part in my story where the player has to click a link 5 times to be able to move to that passage. I am using Twine 2 and Sugarcube 2. I tried to search for this but no luck.

Comments

  • Something like the following should do what you want:
    <<link "CLICK ME">>
    	<<if ndef _clicks>>
    		<<set _clicks to 1>>
    	<<elseif _clicks lt 5>>
    		<<set _clicks++>>
    	<<else>>
    		<<goto "SOME PASSAGE">>
    	<</if>>
    <</link>>
    
    NOTE: If you want more than one of these links within a passage, each will require separate temporary variable names—i.e. the _clicks bits.
  • I've had a similar issue - does anyone know what the equivalent to this code would be in Harlowe 1.2.2?
Sign In or Register to comment.