0 votes
by (120 points)
Ok, I don't know if you will understand my question, because I don't understand my question either lol

I have a passage with 2 choices.

Ex: Sentence

Choice 1 / Choice 2

If the player clicks on the first choice, he goes to another passage. But if he clicks on the second one, there's a link-replace (like a sentence appear, with the same two choices at the end)

I just can't figure how to erase the first choice if the player choose the second one.

Am I clear?

FYI: I'm using Harlowe twine 2 or whatever it's called lol

2 Answers

0 votes
by (170 points)

Instead of using a link-replace, you could use a click-replace macro string. Example: 

There might be mushrooms that way, which would make a good addition to (link:"supper")[Cherie's favorite chicken soup] if she found the right kind. 
(click:"mushrooms")[(replace:"which would make a good addition to supper if she found the right kind")[which she really loved but her mentor probably wouldn't appreciate very much]]

The same thing works if you've made "supper" into a passage link. :) 

by (159k points)
Due to how the (click:) related macros work internally it is recommended that you try to use the (link:) related macros instead whenever possible.
0 votes
by (159k points)

Please use the Insert Code Snippet button when including code examples with your questions or comments, it makes them easier to see and read.

You can use a named hook combined with a (replace:) macro to achieve the effect you want.

First long sentence with choices at the end.

|firstchoices>[\
[[Choice 1->Next Passage]]
(link: "Choice 2")[\
	(replace: ?firstchoices)[\
		Second long sentence with choices at the end.

		[[Choice 3->Next Passage]]
		[[Choice 4->Next Passage]]
	]
]
]


note: If you are planing to chain multiple of choice replacement effects together on the same page, or if the content the choices are being replaced with is long or complex, then I suggest placing that replacement content within child passages and using a (display:) macro within the (replace:) macro call.

1. The (parent) passage that all the choices will appear in.

First long sentence with choices at the end.

|firstchoices>[\
[[Choice 1->Next Passage]]
(link: "Choice 2")[\
	(replace: ?firstchoices)[(display: "Second Choices")]
]
]


2. Possible content of the Second Choices child passage.

Second very long content that includes \
(if: $variable is "value")[some] \
(else:)[dynamic] \
parts

|secondchoices>[\
[[Choice 3->Next Passage]]
(link: "Choice 4")[\
	(replace: ?secondchoices)[(display: "Third Choices")]
]
]

 

...