Sorry if I wasn't clear, maybe I don't know how to explain, only showing.
Let's suppose I have this:
So when the player clicks "shield", the item (set in another place) will be stored in my "items" array.
But write all this code all time where there is an item can bloat the code a bit. How can I, if possible, do something like:
where $itemshield is (link-reveal:"shield")[(set: $inventory to it + (a: $shield))]?
Let's suppose I have this:
You've found a shield!(click:"shield")[(set: $inventory to it + (a: $shield))]
So when the player clicks "shield", the item (set in another place) will be stored in my "items" array.
But write all this code all time where there is an item can bloat the code a bit. How can I, if possible, do something like:
You've found a $itemshield
where $itemshield is (link-reveal:"shield")[(set: $inventory to it + (a: $shield))]?