Hi guys. I'm working on my first Twine game, and given I have zero experience with all this Javascript stuff, I have no clue how to actually make a working inventory. I scoured the forums for about two days straight and still haven't found a way to add or remove items and have kind of currency for my game.
What kind of coding would I need to figure out to implement this?
This is what I have thus far in my side bar.
(if: $inv's length is 0)[<b>You aren't carrying anything!</b>]
(else:)[You're carrying:$inv]
Working in Harlowe, btw.
Comments
But then, how do I get these changes to reflect properly in the sidebar? It's now showing like so:
It says this even though I have the if-statement that should tell you that you aren't carrying anything.
And lastly, how do I keep the story contained to the right? The text moves under the sidebar once past it.
The fact that it's printing 0 suggests the variable hasn't been initialised.