I'm pretty sure this was answered, but in a different way than I could understand to my knowledge, I did look for almost an hour though but, I have a part in my passages where you have a choice to eat bread, and I want it to say "There are crumbs on the plate" instead of "There is bread on the plate" after you eat the bread. Thanks in advanced!
Comments
You also didn't supply an example of the content of your passage, so I will assume that it looks something like the following:
You can use a (replace: ) macro within the (link:) macro to achieve what you want. The (replace:) macro can be used in one of two ways:
1. Pass the text you want to replace: ... this method will search the current passage for ALL occurrences of the indicated text and replace ALL of them.
2. Use a named hook to mark the text you want replaced:
Say I start with something like this:
This works as far as it goes but what I'd like to have happen is that the second link (whichever link the player doesn't click) also disappears, or becomes unclickable. Is that possible? Could I add something to this example to make that happen?
I am using Harlowe and Twine 2.
The following wraps the links within an options named hook and replaces them with styled text.
note: You are indenting your code using space characters, you may find it quicker/easier to use tab characters instead (less typing).
One way to format code examples using tabs is to write and format it within the hosted Twine Passage Editor. *smile* Or a Text Editor if you have one. (Notepad?)
1. Add the following to your startup tagged special passage, it uses the (set:) macro to create a $ate_bread variable and defaults it to false.
2. Now change the Eat Bread related passage to use an (if:) macro and an (else:) macro to show different text depending on the current value of $ate_bread variable.
If you do this you will see a (go-to: ) macro listed within the links section of the ToC, use one of these to move to another passage.