+1 vote
by (160 points)
edited by

So, I know this question has been asked already by J534, but it was in Harlowe format (read: this question) I'm using Sugarcube, and I was wondering if there is a way? I've been fiddling around with my code but I can't figure it out. Help, please?

1 Answer

+1 vote
by (63.1k points)
selected by
 
Best answer

You may either use setter links or the <<link>> macro.

 

Example → setter link:

[[You name him George.|Some Passage][$name to "George"]]
[[You name him Mud.|Some Passage][$name to "Mud"]]

 

Example → <<link>> macro:

/* Using separate arguments. */
<<link "You name him George." "Some Passage">>
	<<set $name to "George">>
<</link>>
<<link "You name him Mud." "Some Passage">>
	<<set $name to "Mud">>
<</link>>

/* Using wiki links. */
<<link [[You name him George.|Some Passage]]>>
	<<set $name to "George">>
<</link>>
<<link [[You name him Mud.|Some Passage]]>>
	<<set $name to "Mud">>
<</link>>

 

Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.
...