+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 (68.6k 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>>

 

This site has been placed in read-only mode. Please use the Interactive Fiction Community Forum instead.
...