Bernkastel
Member
I'm attempting to use a Hotbar that simply has references to what each item is, which one is currently being selected, and I'll have my own script deal with using the items when receiving input. My problem is that the hotbar is dynamically assigned the player inventory as the owner, but it is not showing any items that are currently in the player's inventory. I want index 0 of the player inventory to show up simultaneously in index 0 of the player hotbar, but also index 0 of the player inventory. This way the player inventory may have a 3x12 inventory display, but also a 1x12 hotbar display.
Player full inventory:
Player Hotbar:
This hotbar should have those two items in the first two slots but it does not for some reason. Is there an intended way to do this? Also what is the easiest way to get a reference to the 0-11 indexed items and which one is currently being selected by the hotbar? I'd like a separate script to listen for input and then use the currently selected hotbar slot to pass that item reference to an interactable script which determines how the item will be used. That interactable script might determine it uses up the item and remove one from the player inventory for example.
Player full inventory:
Player Hotbar:
This hotbar should have those two items in the first two slots but it does not for some reason. Is there an intended way to do this? Also what is the easiest way to get a reference to the 0-11 indexed items and which one is currently being selected by the hotbar? I'd like a separate script to listen for input and then use the currently selected hotbar slot to pass that item reference to an interactable script which determines how the item will be used. That interactable script might determine it uses up the item and remove one from the player inventory for example.