so i built a basic inventory for the gamebook im working on in Harlowe 1.2.3 based almost exactly off of this site:
http://gersande.com/blog/designing-inventories-in-twine-2-with-the-built-in-harlowe-macros/
the difference is that inside of my inventory i also keep record of various statistics (karma, money and a few others) which change throughout the book using
(set: $karma to $karma + 1)
now my issue comes in when i use the return button in my inventory
(link-goto: "Return", (history:)'s last)
to return to a passage where i gain or lose stats it will run the code again and add or subtract from my stats a second time thus making a way to cheat the stat system. Is there anyway to make it so it will only run a certain bar of code once? any help would be greatly appreciated!
Thanks
-Chrisgbw
http://gersande.com/blog/designing-inventories-in-twine-2-with-the-built-in-harlowe-macros/
the difference is that inside of my inventory i also keep record of various statistics (karma, money and a few others) which change throughout the book using
(set: $karma to $karma + 1)
now my issue comes in when i use the return button in my inventory
(link-goto: "Return", (history:)'s last)
to return to a passage where i gain or lose stats it will run the code again and add or subtract from my stats a second time thus making a way to cheat the stat system. Is there anyway to make it so it will only run a certain bar of code once? any help would be greatly appreciated!
Thanks
-Chrisgbw