Twine Version:Twine 2.10
Harlowe 3.3.9
Sorry its long, idk how to express myself.
Also trigger warning: Extreme mess, idk what i am doing but it somehow works? ![]()
Curently working on detective IF for my teenage scout kiddos for Halloween. Part of the game is online - MC is sending letters, player uncover a cypher in each of them.
To read the next letter and advance with the story the player has to input correct solution of the cypher into input box.
I run into very specific situation in this game and didnt find anyone asking this yet (correct me if someone did please!).
At certain points i offer hints to help solve mentioned cyphers, so players can proceed even if they aren’t able to get theere entierly themselves.
I have that fixed with “Append:?Sidebar” passage tags situation, where a lightbulb icon takes player to the passage “Hint”.
There they input a specific code (fe: Cypher 1 has code ABCD) and thru display macro i show them what they need to solve it (Cypher 1: Here are 2 different hints on how to solve that one!).
So far so good, but here is where it gets messy, so hold on to your hats.
In theory i want them to go right back to “history’s last’” passage - let’s name it Cypher 1 for this Q.
However if they make a mistake in the specific cypher code, they need to rerun the Hint passage and in that moment the last in the history is the Hint passage and the
(go-to: (history:)'s last))
became unusable, bc History’s last is no longer “Cypher 1” passage, but “Hint” instead.
Here is what i came with so far:
(if: (history:)'s last is not “Hint”)
[(set: $historylast to (history:)'s last) [(link-goto: “Go back where you came from”, $historylast)] ](else:)[ (link-goto: “Go back where you came from”, $historylast) ]
It works as far as i can tell, but i have no idea how and i know in my bones there is a better solution for what i need.
And i am also kinda worried what will happen if they visit the Hint passage more then once, i have 8 cyphers in total and i still didnt manage to test what will happen when they visit passage Hint from passages Cypher 1 and Cypher 2, 3, … as well.
I strongly susspect it could work better with counting the visits for passage “Hint” and then forgetting the amount of the visits, but it breaks my brain.
If you have any ideas how to make this more functional and less qoofy looking please let me know!
Thank you all for any and all ideas for this.