Hi,
Sorry if this is a super obvious question, but I'm new to this and have no experience writing code. I want to create links within my story and set/change variables I've created based on what the player clicks. So for example, a player has a conversation early in the game that affects his possible destination later on. He then makes a choice about the mode of transportation to get there, something like:
transit(set: $destination to "cafeA")
transit(set: $destination to "cafeB")
on the transit page, the player chooses a method of transportation, something like
subway
car
bike
with each of these story options being the same, no matter whether they chose cafe A or cafe B. When they finish their trip, I was then hoping to run a script that gave them appropriate options when they exit the subway/car/bike based on the earlier location they chose, so if the variable $destination was set to cafeA, it links to one story branch but not the other. My problem is that writing the variables like
transit(set: $destination to "cafeA") doesn't imbed the hook inside the link and run it only when it's clicked; it simply runs it when I reach that page.
Hope that makes sense, any help is greatly appreciated.
Comments
In Harlowe you can use a combination of a (link:), (set:), and (goto:) macros to create what is commonly called a Setter Link.