I've tried to look find how to fix my problem but I can't seem to find the right answer.
Basically what I'm trying to do is have the player reach a point in my game where they're allowed to restart. But on their 2nd attempt, I want the game to remember this and as they reach the same point where they restarted at in their first attempt, should they decide to attempt to restart again, it'll lead them to a new passage.
To make it clearer: Player wakes up and starts at his house. He decides to go into the forest. After a few passages, he has the option to go back home or to go deeper in the forest. If he goes home, he goes to sleep and wakes up again in his house and starts over from the beginning.
If he decides to go back home, he is in the beginning again which is waking up and starting at the house then going into the forest. After a few passages, he has the option to go back home or to go deeper in the forest. But this time, if he decides to go home again, he dies.
__________________________________________________________________________
What I want to is to have the game remember that he decided to go home once already, and if he decides to do it again -- it'll take him to a new passage that pretty much says he's dead.
Is there a way to do this without set codes or creating way more passages? I just want a way to re-direct to a new passage. I want the game to remember that he came back home once and if he decides to choose to go back home yet again, it'll take him to a new passage than one he would of gotten if he chose to go deeper into the forest.
Comments
You could possible use a combination of the (history: ) macro with the (count: ) macro to determine how many times the reader has visited the Home passage.
I'm new to Harlowe so Im sorry but would doing (set: $life to "yes") and (if $life is "yes")PassageName --- would that work?
Regarding your code -- so i would put the set macro at the start of my game, the if macro at the point where my character chooses to go home or go deeper into the forest, where do I put the other two else and else if macros?
The reason I did not suggest using a variable to track if the reader lives or dies is because you asked for a solution that did not use one.
As indicated (highlighted) in my previous comment, both the (set:) macro and the (if:) related macros go in your Home passage. (or whatever you have named the passage that represents being inside the house.)