Forum rules - please read before posting.

open and close inventory by clicking on bag

Hi,

I want to be able to open and close my inventory by clicking on my bag in the corner of the screen (part of the UI). Is there a way to use AC to do that?

i don’t know which screenshots to provide. If you need any, let me know which windows specifically and I will provide.

thanks :)

Comments

  • edited June 2018
    Hello,

    is this bag inside of a AC's menu?

    You can call an action list when button is clicked if you select Click type and choose Run action list. Then create and link an action list to it.

    In the action list it's under Action type: Menu - Change state, where you can turn on / turn off a specific menu.

    Or you can do it via script as well:
    To open a specific menu
    AC.PlayerMenus.GetMenuWithName("name").TurnOn(true);
    To close a specific menu
    AC.PlayerMenus.GetMenuWithName("name").TurnOff(true);

    If you need to check if the menu is currently opened you can use this:
    AC.PlayerMenus.GetMenuWithName("name").IsOn()
    Returns true if menu is on.

  • edited June 2018
    @Keks ok so i just did what you asked (added the bag menu with a button type to run an action list), how do we make the bag always visible? I know there is an Appear Type, but I want the bag to always be there. Thanks :smile:

    ok I found out how, turns out it's during gameplay appear type (I thought it didn't work but it turns out I had to put the bag texture in the background not highlight section oups)
  • Welcome to the community, @kokokringle.

    Indeed, an Appear type of During Gameplay will have a menu display whenever the player is in control.  You can have it disable even during this time by using the Menu: Change state Action to lock it.

    The bag's ActionList can be made to "toggle" the Inventory menu by preceding your Actions with a Menu: Check state Action.  This can determine if your Inventory menu is on or off - and follow up with one of two Menu: Change state Actions to either turn it off or on accordingly.
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.