I'm still very bad at coding and trying to do things in ORK as much as possible, so please bear with me :)

So I followed the tutorials on harvesting wood and that's working out perfectly. I changed it to stone in this case, but the idea is the same. My character has stone in their inventory.

Now I want to be able to drop off that stone back and base and then keep track of how much stone the player has. I created an event that checks the inventory for item (stone) and, if they have it, it removes it. The next step is the tricky part. I haven't figured out how to then have a global storage variable.

I thought about having Stone as a currency, since the menu screens tutorial already has a way to keep track of currencies. The only problem I'm having is that the event system only has "Set Inventory Money" instead of "Add to Inventory Money." So that means, even if I have 50 stone in my inventory, every time I drop it off it sets the currency of stone to 1, instead of adding to the currency. I tried adding a + sign to the Set Inventory Money value but that didn't work.

And since I haven't yet figured out how to have a properly adding storage of stone, I haven't yet figured out how to then subtract from said storage.

Thanks any help!
  • You can change currency via the Add To Inventory and Remove From Inventory nodes - changing the type of the item to Currency will add/remove the selected currency.

    Also, the Inventory To Variable node allows you to store the quantity of an item, currency, equipment, etc. into a float variable.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.