I've searched a few times and can't seem to find something that will work, but apologies if I missed it! I'm very new to Twine (2.0) and I'm using Harlowe. I would like to have a health value assigned to the reader/player, that diminished sometimes, based on which passages they chose. I believe it would gamify my Twine a bit, and give the reader incentive to replay the Twine to try to minimize damage by picking alternate routes to the end (if upon completing the Twine it displayed the player's ending health, that would be fantastic).
If there was a bit of code I could put on certain passages (ideally invisible) that would mean that when those passages are visited, it would diminish health, that would be fantastic.
I was reading about health and hooks and I'm not sure if that's the right vein for what I'm after or not. Any help would be much appreciated!
Comments
1. Initializing your variable:
I suggest using a startup tagged passage to assign the amount of health the character starts with.
To do this first create a new passage (which you can name anything you like but I name mine Startup), next add a startup tag (all lower-case) to the new passage using the + tag button, and finally add the following to new passage:
2. Decreasing the characters health:
Add a (set:) macro like the following to any passage you want the characters health to decrease in.
note: You can change the above values of 100 and 10 to anything you want.
This was a huge help!