+2 votes
by (420 points)
I'm trying to state a variable within a <<link>> <</link>> macro, for example this:

<<link [[Continue to Chapter 1 in $difficulty |Chapter 1: Loss Page 1]]>><<script>> Dialog.close()<</script>><</link>>
 

However Twine does not recognise $difficulty and shows "$difficulty" instead of it's actual value.

Is there a way around this?
Thanks in advance.

1 Answer

+1 vote
by (420 points)
by (159k points)

Or simply use the version of the <<link>> macro that accepts two String values.

<<set $difficulty to "Abcd">>

<<link "Continue to Chapter 1 in $difficulty" "Chapter 1: Loss Page 1">><<script>> Dialog.close()<</script>><</link>>

 

...