Forum rules - please read before posting.

Gamepad - Inventory - Lose selection of inventory Item

Hey Chris,

I’m currently integrating gamepad support into my game and I’m struggling a bit with the inventory.

  1. When I select an item and combine it with another item, the usual interaction dialogue plays. After that, the menu is still open, but I can’t select any other item anymore. The item also seems to remain selected, because when I close and reopen the inventory, the selected graphic is still shown and I can choose another item to combine with it.
    It’s fine that the item stays selected until I use InteractionB to deselect it, but I want to be able to combine it with multiple items without having to close and reopen the inventory each time. Any idea why this happens?

  2. The second issue is probably easier to solve. When I select an item in the inventory, it shows the** Selected Graphic** (the item icon with reduced opacity). However, you cannot see that the slot is still active.
    Is there a possibility, similar to the Item Cursor Icon, to have two graphics that swap? For example: the selected graphic appears, but the slot still shows the "Hover"- Selected graphic. Without this, it looks like the inventory is no longer active, and it feels a bit like a bug until you learn that you can still use it normally.

I’ve added some screenshots of my settings and an example of the graphics.

For the Inventory using Unity UI Prefab and the Default Inventory box type.

Thank you in advance, and all the best,
Marco

Comments

  • Sorry, I'm not seeing any screenshots. Can you share direct links instead?

    What are your AC/Unity versions, also, and are you using Input System or Input Manager for input handling?

  • Hey Chris,

    I'm sorry, I thought it is enough to put a link up there in the Image section. But it didn't work.

    Here is the Link https://imgur.com/a/NRdDz7l to all the pictures.

    Adventure Creator: v1.83.0
    Unity: 2022.3.8.f1
    And: Input System

  • 1) This'll be more of a test than a solution, but does it work if you end the combine Interaction with an Inventory: Select Action to force selection of the original item?

    It'll also be worth checking to see if the Item is becoming de-selected. Add an Event Runner component to the scene, use it to define an Inventory: Deselect event, and have it run an ActionList: Comment Action that prints some text to the Console. Does this show at any point upon combining the items? If so, what is its full stacktrace?

    2) Through scripting, it's possible to override the "Selected graphic" texture via the SelectedTex property.

    Are you looking to change the appearance of the selected Item when hovered over in the Menu?

  • Hey Chris,

    first of all, thank you!

    As a small workaround for point 2), I’ve implemented a “cursor snap” to the inventory when using the gamepad. The cursor is always positioned over the currently selected item, and after selection the icon switches to that item. This makes it very clear which item is selected, so hopefully no additional visual indicator is needed.

    Regarding point 1), unfortunately I don’t remember exactly what I did to fix it, but I somehow managed to solve the issue after trying a lot of different things. The important part is that the item now stays selected after being combined with other items in the inventory.

    Best
    Marco

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.