Forum rules - please read before posting.

Turning off right click deselection

Is there a way to turn off the function that deselects the active item with right click when using Multiple Inventory interactions? I saw that there is an option for this in Single mode but not in Multiple. I searched the manual and the forums but I couldn't find anything about it.
(Both Unity and AC is the newest version).

Comments

  • What are the rest of your Interaction and Inventory settings? Share a screenshot of your Settings Manager if you can - interaction behaviour is based on more than just the "Inventory interactions" setting.

    If you've no need for right-clicking at all, one way would be to uncheck "Mouse clicks have default functionality?" in the Settings Manager, and then create a new Input named InteractionA, mapped to "mouse 0", to bring back usage of the left-mouse button.

  • Here are my Interaction and Inventory settings:

    By the way I tried what you suggested and it's working for me right now.

    The problem was that I used the right mouse for opening the inventory. In the script I put a line where the right button first deselects the active item, then for a second click the Inventory opens. This worked on the first scene (wherever the game started), but after a scene switch it did not work anymore: the right click deselected the active item and opened the inventory at the same time. Any ideas why it happened?
    This part of the script:
    if (Input.GetMouseButtonDown(1) && KickStarter.stateHandler.IsInGameplay())
    {
    if (KickStarter.runtimeInventory.SelectedItem != null)
    {
    KickStarter.runtimeInventory.SetNull();
    }
    else
    {
    PlayerMenus.GetMenuWithName("Inventory").isLocked = false;
    }
    }

  • Is the script present in both scenes? It'll only kick in when in the scene. You can either place another instance of it in the second scene, or mark it as DontDestroyOnLoad to have it survive scene changes.

    However, I'll add an additional "right click deselects item" option to the Settings Manager based on the above combination of settings in the next update.

  • Yes, it is present in all the scenes, that is why this behavior is strange for me.
    That option would be nice. Thank you for the help!

  • The option is included in the latest release, v1.72.3.

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.