Forum rules - please read before posting.

Single 'Use' - Left and right click

Hi everyone,

I am developing with AC a game which uses the left click to run actions and the right click to show the inventory. The interacton method of my game is 'choose hotspot then interaction'. If a hotspot has at least two interactions, you can only use the mouse's left click button, but if you activate the 'Single use interaction' option in the hotspot, you can use both the mouse's left and right click button.

It should not be a problem, but in my game, the right click button is used to show the inventroy and lock the camera. If I click with the right button on a hotspot with the 'single use interaction' option, AC runs the action, shows the inventory and locks the camera. I want to avoid this feature. I only want to run the actions with the left button. Is it possible?

Thank you very much.

Greetings

Comments

  • edited June 2020

    Welcome to the community, @Arrhenius.

    I'm not sure if this classifies as a bug or not, but I shall look into it further.

    However, you should be able to sort this out in the meantime by opening up the PlayerInteraction.cs script file and replace the line:

    else if (KickStarter.runtimeInventory.SelectedItem == null && hotspot.IsSingleInteraction ())
    

    with:

    else if (KickStarter.runtimeInventory.SelectedItem == null && hotspot.IsSingleInteraction () && KickStarter.playerInput.GetMouseState () == MouseState.SingleClick)
    

    It should be around line 828 if you're using the latest release.

  • Perfect!

    Thank you very much.

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.