Twine Version: 2.3.16
Story Format: SugarCube 2.36.1
I’m trying to set up an inventory system. I’ve gotten to a point where I can add to my $inv and the descriptions show up in my inventory passage. However, I’m struggling to figure out how to make them mean anything for instance…
In my StoryInit I have pie as…
<<set $pie to "a delicious dessert">>
Let’s say someone gives me a pie…
<<set $inv to $inv + $pie>>
My inventory passage which is set up as "In your inventory you have : $inv "
That now displays “a delicious dessert”
My question is in another passage. I want a dialogue that says “Give him the pie”
Only if my $inv actually has that pie, and then have it removed from inv.
What would that look like as far as code?
Appreciate any help