Hi
Is there a way to limit the total number of items in the inventory at any one time and to check that when trying to pick up an item?
I'm assuming that I might need a global variable and to check that in each action list before adding an item to the inventory, and then showing a standardised response string, but wanted to check whether there was a built in method before I roll something up.
Thanks
Olly
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
You can precede use of the Inventory: Add or remove Action with an Inventory: Check Action to determine if they are carrying less than a given amount.
If so, add the item. Otherwise, branch it off to a Dialogue: Play speech Action to give a standard response.
To have this sequence play out each time you want to give the Player an item, use these Actions in an ActionList asset, and override the Inventory: Add or remove Action's Item to add field with an Inventory Item parameter. That way, you can then run the ActionList using the ActionList: Run Action each time you want to add an item, and set the intended item each time.
ActionList parameters are a way of "recycling" ActionLists by altering their field values at runtime. A tutorial can be found here.