Forum rules - please read before posting.

RemoveAllInCategory doesn't exist anymore?

Hello, I'm needing to remove a lot of items all at once of a specific category from the inventory and a search of the forum came up with runtimeInventory.RemoveAllInCategory() but it doesn't seem to exist anymore. What are my alternatives?

Comments

  • edited February 2021

    Welcome to the community, @nekoroad.

    Don't worry, it's just been moved. In v1.72.0, the Inventory API was written to be much more flexible - with all sets of inventory items (the Player's, Crafting, Containers etc) being stored in separate InvCollection classes. You can learn more about this new system here.

    To remove all items in a specific categeory from the Player's inventory, you can use:

       AC.KickStarter.runtimeInventory.PlayerInvCollection.DeleteAllInCategory (categoryID);
    
  • Thanks Chris. I'm new at using Adventure Creator but I gotta say, it's pretty awesome, nice work!

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.