Hello, good afternoon.
I’m trying to create a very simple inventory system, similar to the one in “Hello Neighbor”.
The idea is that the player can pick up, drop, and swap between objects (without destroying or creating new actors).
I don’t want to use “Structures” or “Data Tables”, just basic functions like “Attach”, “Detach”, “Set Hidden in Game”, and Arrays.
I’ve watched many tutorials, but they all use complex systems (with Spawn/Destroy Actors. Data Tables, etc.), and I’m looking for something more straightforward.
With the help of ChatGPT, I’ve made a lot of progress, but we’ve run into some bugs that we can’t seem to solve.
I share with you my actual configuration, there is 4 functions that i made with the help of the IA inside of the BP Player.
“PickupItem”
“UpdateHeldItem”
“DetachHeldItem”
“DropItem”
And 4 variables.
“Inventory (Array Actor 5 slots)”
“CurrentHeldItem (Actor)”
“SelectedSlotIndex (Index)”
Local in UpdateHeldItem “SelectedItem (Actor)”
I have 3 problems.
The first, is in the function “Pick up Item” they don’t have a Loop then verificare the empty slots of the inventory. This causes it to skip slot 2 and go directly to slot 4 if slots 2, 4, and 5 are empty. I tried to fix this with the help of AI, but its solution didn’t work.
The second.Is when the player drop a object, the information in the array get “Deleted” but in the index not. This causes the inventory to appear full if I pick up and drop an item 5 times and then try to pick it up again, despite they dosent have any object in the inventory.
The third, is more like verification, when the game start, the inventory appears like full despite they doesn’t have any object in there. The solution that give me the IA is use “Clear Array” of inventory in “Event Begin Play” and i dont know if is the correct way.
I only need a basic system with:5 visible spaces (images or icons)Grab, drop, and switch using keys 1 through 5No Spawn or Destroy Actor, just Attach/Detach
I appreciate any help or guidance.
If the current system is too confusing, I wouldn’t mind redesigning it from scratch with your input, as long as it remains as simple as possible. PS the english is not my native language If i made any mistakes in my writing i apologize in advance.
Thank you for your time.



