I'm very new to Twine! I tried to search for this but wasn't sure exactly what wording to use and didn't find anything in my searches.
I want to have the user take part in a conversation. There would be two clickable links, and the one you pick slightly alters the flow of the conversation. But I want both links to become non-clickable when you click either one of them, because things start to look weird if the user clicks through the conversation normally and then goes back and clicks on everything that's still clickable. If that makes sense. So it would be something like this:
Do you want to do the thing?
[I'd love that!]<Yes|
[Well...]<Maybe|
(Click: ?Yes)[Yay!](Click: ?Maybe)[Pleeeeease?
[Well okay.]<Okay|]
(Click: ?Okay)[Yay!]
Except that when you click ?Yes, ?Maybe also becomes deactivated, and when you click ?Maybe, ?Yes also becomes deactivated. Does this make sense?
Comments
One option that worked for me was to have a |body>[] hook and a |options>[] hook. You append to the body hook and replace the option hook at every "turn" in the conversation. This is a lot of overhead for a short conversation, but for longer conversations, you can have your conversation span several passages and have each passage be fairly readable:
Passage 1: Passage 'dialogue_yes': Passage 'dialogue_maybe': Passage 'dialogue_ok': I'd love to hear other people's solutions.
It's a bit tricky to explain as I'm still trying to get my head around it myself but it does work - as mentioned, it uses an array variable to track choices made, tracks the array variable length to show and hide new choices, and makes use of the goto: macro to send the user back to the same passage after each option has been selected. It's primarily driven by click macros, which are at the bottom of the code. One slight bug I did notice is that when the css uses a larger image, every time the user is sent back to the same passage, the images seems to nest itself within the passage which looks a bit odd... I'm still thinking it might be more work than it's actually worth (and I'd imagine it'd be quite horrid to debug/test if you went wrong somewhere) - particularly as it's just aping functionality that twine already has - the thing is though, for conversations like this I'd rather have it contained in one passage, and have the twine map only reflect game changing branches/choices as opposed to just dialogues with characters (which won't really change anything). I've tested it with a conversation taken from Dragon Age: Origins (mainly because it was one of the few examples I could find online), which is linked in the example file once you've run through the dialogue.
A working example can be accessed here.
Full code is below. It's not very well noted, and the first four lines are just to track player progress through the dialogue - I'd exclude these lines usually. Anyway, like I've said, I'm not convinced this is workable or maintainable in a project, but thought I would share.
|body>[[Option 1]<Op1|
[Option 2]<Op2|
[Option 3]<Op3|
[Option 4]<Op4|]
(click: ?Op1)[(set: $choice to 1)(replace: ?body)[The replacement text or whatever]]
(click: ?Op2)[(set: $choice to 1)(replace: ?body)[The replacement text or whatever]]
(click: ?Op3)[(set: $choice to 1)(replace: ?body)[The replacement text or whatever]]
(click: ?Op4)[(set: $choice to 1)(replace: ?body)[The replacement text or whatever]]
I found it easier to nest hooks. I set my options inside a block to remove them all after the choice is made but still create distinct click/set combos for each.
I have to wonder if this would be better done with (link:) but I hate to go back and change so much of my own work.
Oh my god mobile is a pain for this, maybe I'll stick to reading only.