Forum rules - please read before posting.

Locking Inventory while it is still active?

Hi. Is there a way to disable all Inventory buttons while it is still open? I want to prevent the player from doing anything with the inventory while I show them something while the inventory is open. Then give them back control of the inventory while it is still open. I haven't found a proper way to do this. Is there an action or line of code that accomplishes this?

Comments

  • edited September 2023

    What is the Menu's Appear type set to? If you make the "show them something" sequence a cutscene, and the Menu is shown during this time, then it should be non-interactive unless you check the Clickable in cutscenes? option.

    You can adjust the Menu's Ignore input? property at runtime through script - right-click its label to get an API reference to it, which you can then use in a custom script function that can be invoked with the Object: Call event Action.

    See this tutorial for a guided explanation on this technique.

    Alternatively, if your Menu uses Unity UI, you can attach a Canvas Group high up enough in the prefab's Hierarchy such that your Buttons are all children of it - and then control its Is Interactable property either through script or animation.

  • You can adjust the Menu's Ignore input? property at runtime through script

    That worked partially. I can't press the buttons but they're still being highlighted when hovering over them. A hover item is still being assigned. Is there a way to make it so that it ignores that as well?

  • Try the Canvas approach I mentioned as an alternative. You can uncheck "Is Interactable" manually in the Inspector to test quickly.

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.