Hello, about a year ago, EncryptedCow linked me a very nice text inventory example capx. I have modified it so that when function "add_item" is called, it adds the current value of this global variable "itemID_to_add" to an inventory slot.
Right now as it is, to take away an item, the text object displaying said item must be right clicked. However, i'd like to change it so that when a "subtract_item" function is called, then the value of the global variable "itemID_to_subtract" is taken away from an inventory slot that contains said item.
Could someone help me find out how to do what I need? At it's current state, I can only take away items when I right click the text. But I need it so that I can subtract it at any time, like when purchasing something it takes away some coins or a door takes away a key, you know?
Here is the capx https://dl.dropboxusercontent.com/u/30826419/modified%20text%20inventory.capx
I've made it so that when you press A, "add_item" is called. When you click on a color, the value of its "itemID" instance variable is copied to the value of "add_item", and there is text on the bottom right that will tell you what items are to be added and subtracted, in case you're not in debug mode. Thanks!