Forum rules - please read before posting.

Issue with graphic menus

hello,
I'm using AC 1.66.1 + unity 2017.1f1 for a 2d graphic adventure.
I have a little issue with the graphic menus. In my inventory I have some items that I can examine. When I click to examine I can open a menu with a graphic and it's all ok. The issues come when, with the inventory still open, I examine consequently more items that have a graphic menu attached. In this case AC opens graphic menu of the first item, but when I click to examine the second item the graphic menu of the second one go over the first (without close the first one) and so on. I tried to add an action that turn off the all menus before examine a second item, but it seems not to work.

Thank you.

Comments

  • You'll need to give more details about the way your menus are set up. There's no "default" graphic menu, so I don't know what you're actually working with. Are you relying on custom scripting to generate a new instance of such a menu?

    Please share as much information as you can to help illustrate the problem.

  • Thank you Chris, here more details:
    I created various menus (actually I link two, but the problem is on all the menus). I used them when, in inventory, I click with RMB to examine. In this way I can open the menu and show, in this case, a letter. So the menu are made by a graphic section (with the letter) and a button (when the player click with the LMB it closes the menu).
    So you can see the settings of two menus (menu01 and menu02).
    The issue is when, with the open inventory, I click with the RMB on a letter (so open a menu), and, without close it with LMB, I click again with thr RMB on another item that open a new menu. In this case I have the first menu, and, behind it, the second one. But I need that it opens only the second one, closing automatically the first one (step01 and step02)

    menu01:
    https://drive.google.com/open?id=1wPslNcuTK_Ae90QMmI7ciAMNbudNfZxW

    menu02:
    https://drive.google.com/open?id=14zO3nGxDO9l_gshivAKTX0_MxNgvPe7V

    step01:
    https://drive.google.com/open?id=1ZuT2fZqIEx0RJWq6EolpvnKxa7Flu5tb

    step02:
    https://drive.google.com/open?id=1c7ZtrttpVOKEJ_MLr9I5HMDOp4xFR6Oz

    thank you again.

  • You'll need to specifically command AC to turn off the Menus you don't want. At what point are you turning the menus off?

    If you create an ActionList asset, with Menu: Change state Actions to instantly turn off all of these menus, you can then run it with an ActionList: Run Action at the start of each of your Inventory interactions.

  • Hello Chris, thank you very much. This system is almost correct. Now I have this little issue: I created an ActionList to close all the menus and then I run it at the start of each inventory interactions, and it works...but...for some menus I have an "ActionList when turn off" linked (usually a phrase).
    So now I see this phrase, then the game call the menu and then again this phrase (when I click with LMB to close the menu). Is there a way to solve this issue?

  • You can bypass the ActionList if you force off the menu through script, i.e.:

    AC.PlayerMenus.[GetMenuWithName](/scripting-guide/class_a_c_1_1_player_menus.html#aead571ebcc7e25975f87e45900716909 "GetMenuWithName") ("MyMenu").[ForceOff](/scripting-guide/class_a_c_1_1_menu.html#a6b59e6bb4b50dbf4249c1e5ffcaf790e "ForceOff") (true);
    

    Such a script could be placed in a custom script, attached to a prefab, and then run via the Object: Call event Action.

    Otherwise, you'll have to make use of a variable to determine whether or not the Actions within the "when turn off" list are actually run.

  • thank you very much, Chris

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.