Finally been thrown for a loop on a problem. First post, but lurking for a few months.
The idea is this: I'd like for a player to visit a location and randomly see 2 people out of a possible 5. They can then choose which person to talk to, which takes them to separate passage for that conversation.
Next, I'd like to make the chosen person no longer show as an option at this location once their option has been chosen. I still want to have a choice and show 2 people out of the remaining options.
I've attempted creating a datamap that includes the possible passages, but Harlowe doesn't like that code. I've tried creating an array and using Either to assign a random number to a variable and then coding it to pump out a different location based on this, then... Well, it would get labor intensive. But, there's gotta be something aside from pages of repeated entries to solve this problem.
Thanks!
(Using Harlowe 1.2.3, Twine vers. 2.0.11)
Comments
In a startup tagged passage:
In the passage in question:
You could set up to go the conversation passages using something like:
So you'd need to delete the resulting passages with gibberish names and create passages with names like 'talkSarah' or 'talkJames', which is probably what I'd do personally. If you do so, note that you'll need additional control logic to prevent 'talk<-Talk to' links and such from being created. You could also create an array of objects, but I'm not 100% sure how to make that work in Harlowe.
The following is the macro equivalent of the markup link example by @Chapel:
Sorry if I'm taking bits and pieces of what you have said, and using them differently, but here is my amateur code. I used three variables just to make sure it worked and shuffled them.
On passage "T2", I simply set the variable as "visited" and upon return, I only see the other two options listed forever. Which is perfect.
I'll have to learn the Move macro at some point, but this allows for no use of it.
Thanks again, I appreciate the thought-process and if you have any suggestions on streamlining this, let me know.