Hello! I'm creating a game using Harlowe 1.2.3 in Twine 2, and I'm experiencing a bit of difficulty with items.
I'd like for the player to track down some currency before leaving their home, and I'm using an if macro to track whether the player has enough money on them before proceeding. I thought I was using the relevant macro to increase this variable, but it doesn't seem to be working, and I'm not sure if I'm using the accurate code (which is likely as I'm a complete novice). I've also been using the back button to return to different areas, and I've read that serves as a reset, so that might also be a contributing factor.
Thank you for taking the time to read this.
Comments
The Harlowe Undo link (in the left sidebar) winds the story's history system back one step to display the previous passage, which results in all known variables being reverted back to the state they were before the previous passage was displayed.
If you want to return to the previous passage while retaining any variable changes done in the current passage then you need to add a link like either of the following to the current passage. (they work in both v1.2.3 and v2.0.0)
I suspect there's likely some errors with my coding (my Internet connection's been a bit unstable so checking I've input the correct code has been tricky)
To increase the currency variable I used:
And as for the if/else statements:
Any corrections would be most welcome.
2. In the (if:) macro, you have 'is >', this should just be '>'. Harlowe 2.0.0+ allows the 'is', but it's not a good practice anyway, since 'is' is translated into '===', so your code reads '=== >'. Since you're using harlowe 1.2.3, you'll need to fix this. Remember that 'is' is an operator in harlowe's code, not just some grammar.
3. You misspelled 'progesss', just FYI.
4. You are using two different variables here, so keep that in mind. I'm not sure why, or if it's necessary, but just know that the first chunk of code you provided will have no effect on the second because of this.