0 votes
asked by (140 points)

I've been experimenting with the custom Adventures format. As can be seen from the image on the front page, it's possible to code an ineractive chest box that the character can take items from (and possibly put items in). However, I can't figure out how to do this. I think there might be something in the source code, particularly surrounding the lootableInventory sections, but I don't really know.

1 Answer

0 votes
answered by (137k points)

In the Basic Usage > Items section of the documentation it mentions the ability to "spawn items in a small chest under the content of the passage", it then shows an example of using the story.addLootItem() function to add some "loot" related items to the current Passage.

Doing the above will cause the "chest-panel" to be show, which supports using the mouse to drag-n-drop items to & from it.

commented by (140 points)
Thanks so much! I didn't realize there was anything in the documentation about this. I'll make sure to check there next time I get stuck.
Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.