Forum rules - please read before posting.
Tech questions during the weekend? Drop in on the community Discord channel!

Only select items in specific category?

Hi there,

I'm working to create a custom script that will allow me to manipulate menu UI content based on selected inventory items. To accomplish what I'm trying to do, I need to create several different inventory categories which is working really well. But I've run into a snag and can't seem to find an answer. 

Basically, for one of the categories, I link the items to Global Variables. It works perfectly. However, when I select an item in a category that doesn't need to be linked to a Global Variable, I'm getting log warnings ("Variable with ID=XX not found!) because Unity obviously can't find an associated variable for it. So, long story short, I'm looking for a way to add to:

AC.InvItem selectedItem = AC.KickStarter.runtimeInventory.SelectedItem; 
if (selectedItem != null)

in a way that also requires the item be in a specific category. Is this possible? I played a bit with InvItem.binID but couldn't seem to wrap my head around it. 

Many thanks in advance and sorry if I'm blind and the answer is super obvious :)


  • So in typical fashion, I figured this one out AFTER I posted. The answer was to create an inventory property that defined which items should be ignored by the script. 

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.
Do NOT follow this link or you will be banned from the site!