Hi there,
I am currently using the inventory system from the Twine Wiki here.
I am currently using SugarCube because I love the responsive css which passes Google's Mobile Friendly Test, and the built-in save/load. For me, they're must-have. I was previously building in Harlowe, and used to have a far better inventory system found here which was better in the sense that it was built to allow passages in which items could be dropped by use of the "drop" tag. Items could be picked up in one passage and then later dropped (and remain to be picked up again) in a different passage.
Currently I have the SugarCube inventory set to allow a drop via going to inventory, clicking on an item, and then in that item's passage a drop option using a click macro, like this:
What would be the easiest way to modify the code from here to better manage items so that they are not "attached" permanently to a given passage and can be picked up and dropped into any passage seamlessly? Attaching my current test story.
Thanks very much in advance for any help!
I am currently using the inventory system from the Twine Wiki here.
I am currently using SugarCube because I love the responsive css which passes Google's Mobile Friendly Test, and the built-in save/load. For me, they're must-have. I was previously building in Harlowe, and used to have a far better inventory system found here which was better in the sense that it was built to allow passages in which items could be dropped by use of the "drop" tag. Items could be picked up in one passage and then later dropped (and remain to be picked up again) in a different passage.
Currently I have the SugarCube inventory set to allow a drop via going to inventory, clicking on an item, and then in that item's passage a drop option using a click macro, like this:
<span id="Drop">\ <<click "Drop">>\ <<removeFromInv "An Unsigned Note">>\ <<replace "#Drop">>Dropped!<</replace>>\ <</click>>\ <span id="output"></span>\It works, but the trouble is that when you drop an item in a different passage from where you found the item, it removes it from your inventory, but places it back in the passage you picked it up in. To the player this would need to be explained in the story to be some kind of magic in order for it to be plausible.
What would be the easiest way to modify the code from here to better manage items so that they are not "attached" permanently to a given passage and can be picked up and dropped into any passage seamlessly? Attaching my current test story.
Thanks very much in advance for any help!