Forum rules - please read before posting.

Inventory items interactions with keyboard only

Hi! I would like to make game with keyboard input only. I work with inventory now. There is a problem, that I would like to have multiple interactions for items (like 'Cycling Menu And Clicking Hotspots' for hotspots) but when I click InteractionA or InteractionB in the inventory then nothing happens. I read the documentation and I don't see any more what can I do. I have defined interactions for my item, I checked Inventory interactions as 'Multiple' in the Inventory Settings and I have defined 'InteractionA' and 'InteractionB' in my Input Editor. I saw this article but it was promised that it should work from 1.47 so I think I have something wrong in my configuration.

image

image

image

image

Comments

  • Seems there's a new issue with paused Inventory menus.  Uncheck "Paused when enabled?" in the Inventory Menu's list of properties, and it should work.  I'll look into this issue for the next update.
  • Ok, but there is another problem - I cannot navigate with the axis in the inventory when the game is not paused. Is it possible to override player movement with inventory navigation without pausing?
  • Navigating with the axis when un-paused is possible in v1.52a if you use the Engine: Manage systems Action.  You'll also have to use this Action to disable player Movement to prevent conflict.

    Use the Inventory Menu's ActionList when turn on/off fields to have this Action enable/disable the systems at the right time.
  • I updated my project to 1.52, but I'm afraid it does not work or I don't understand you. I unchecked "Paused when enabled?" in the Inventory Menu's list of properties. Then I created action lists on turn on and turn off Inventory Menu. I made disable / enable Movement using Engine: Manage systems action. Player's movement still working. I tried to disable Player and Input and change the movement method to None. It does not work. I tried to debug the action. It is fireing at the correct moment and it's behaviour is expected: It calls method 'SetMovementSystem' from StateHandler class. It sets variable 'movementIsOff' to true and then in the Update method it 'if' block with checking 'movementIsOff' is overlooked. I expected it should work but it does not - I don't know where is it handling but the Player can move anyway.
  • Can you control player direction, or are they just continue to move from previous keypresses?

    It may be that you need to explicity tell the player to stop moving by calling the Character: Move along Path Action, checking Is Player? and setting the Method to Stop Moving.
  • Ok, I could move player because of our custom script. When I turned it off he stopped move through disabling it with action list on inventory on. Unfortunetally I cannot navigate in the Inventory - axis does not work. I can try to debug it, but it will be easier if you tell me where should I start? Where is the inventory navigation in the code?
  • Look for instances of canKeyboardControlMenusDuringGameplay in both PlayerMenus.cs and PlayerInput.cs.
  • Hi, sorry for the chaos, but my collegue @Eleid has some other work to do, so I am working on this task now.

    I checked both PlayerMenus.cs and PlayerInput.cs, but didn't found anything suspicious. I don't see any option to set canKeyboardControlMenusDuringGameplay to true in settings, but ActionSettingsLock.cs allows for it. 
    image
    But after enabling this option in this particular Action (during startup or during opening of inventory) it just throws an exception:
    image
    The reason is that in function ControlSelected there are no array size checks :/. Unfortunately event after fixing that on my own it still doesn't work. One good thing is that now I can navigate through inventory, but when I click InteractionA button when there is no hotspot nearby, it just does nothing and when there is a hotspot it gives interaction menu that I want, but highlighted elements and navigation is based on current hotspot and pressing InteractionA button does nothing.

    Interaction menu without inventory item selected:
    image
    Interaction menu when inventory item is selected:
    image

  • Several issues related to Interaction menus and keyboard-control were fixed in v1.53 - please update to see if it improves anything.
  • Great! Now it is working even with Pause game when enable. Thank you :D
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.