Closed xorgaming closed 3 years ago
Since using doesn't really ever require a transfer I'm thinking just a separate macro makes more sense. I'm also planning on a whole new major version of the simple inventory at some point, so even if I push this, it'll probably not be long for this world. I appreciate the PR a lot though, so thanks, and it's a good idea, though, like I said, probably not worth going through the transfer infrastructure to implement. I'm gonna close it for now, but if v3 of the Simple Inventory winds up taking longer than I expect I'll revisit this.
Hey no problem. If you're taking feature requests, the other thing I'm trying to do is have a generic function handle the 'uses' of an item in your inventory.
For example, if you have a bag of 5 candy and you eat one, it reduces the number by one, and maybe print's dialog that says what each one tastes like (the first is great, but towards the end you start to get sick to your stomach). I don't want to have the same candy-logic in every passage so I'm calling into the Story's JavaScript and have a function there that handle it. I'm sure there's a way to do this with macros, but I'm pretty new to Twine.
Yeah I'm interested in requests. Having optional item definitions with "use blocks" of some kind, that is, code that will run when the item is "used," is something I plan to add.
This way users can 'try' solutions to puzzles without their inventory items leaving their inventory. It feels a little hack-y to watch for the string 'Use' so I'm open to alternatives.
simple-inventory-example.txt