So I've looked at the inventory system people have used and its a bit confusing and I'm not sure if it will do what I want. Does anyone know a good method to make an inventory that can hold x number of weapons/items/armor and can be accessed by the player in order to use items or equip armor/weapons.
Comments
I love L's article that I recommended in my previous reply, and I use it. However, I think the Javascript syntax for removing an item from an array/inventory is pretty hard to remember. So I found an article where somebody wrote a simpler way to "splice" from a Javascript array.
That article is How to Remove an Element from an Array.
The relevant code from that article is: Simply paste that code into a Twine passage and give that passage a [script] tag. Now, anywhere in your Twine game you can remove items from a Javascript array (such as one you've given the name of $inv, for example) like so: instead of like so: Cool!
*I also commented on L's article with this info.
(For more background, read about script passages in the Twine Reference, and about Javascript arrays and about the Javascript indexOf "method" via Google. Lightbulbs will go on.)