Forum rules - please read before posting.

Inventory - Need to access items in inventory, but don't want to show them visibly in inventory view

Hello,

So in my game, I use the first three inventory slots to hold 3 main actions the player can do. I use these things in script by doing things such as :

AC.KickStarter.runtimeInventory.GetItem()

Which works great.

But, when it comes to viewing the player's inventory I don't want these three items to be shown. Instead I want any inventory view to only show the 4th item onwards (so anything but the three starting items).

If I mark the items as not 'carried on start' then I can't access them in runtimeInventory (because the player doesn't have them). So my question is is there any way I can have them in my inventory but not display them?

If they weren't marked as 'carry on start' is there a different way I could pull them from a inventory list in script? Is there an alternative to .runtimeInventory which is the actual inventory list of the project?

Comments

  • I don't know what you're doing after getting the item, but you can also access items from the Inventory Manager itself - which retrieves the "global" list of items as opposed to just those carried by the player:

    AC.KickStarter.inventoryManager.GetIem (id);

    Alternatively, you could create two categories in your Inventory Manager (named e.g. "Normal", "PlayerActions"), and then check Limit by category? in your InventoryBox element(s) to prevent any item tagged as "PlayerActions" from being shown.
  • Awesome. That gives me some soultions to play around with, thanks.
  • Hey, just to close this off, I went with the category option in the Inventory Manager (simply because I was one-handed drinking a glass of wine at the time) and it works perfectly.


    image

    That's one very happy Captain Picard

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.