Chest inventory opens anywhere not just at chest.

Allright, so the print string is spitting out

BP_ThirdPersonCharacter_C_0

ah i think i see the problem

the strange thing is you have the trace inside the inventory, this means if you attach an inventory to your Chest, the chest will also be checking for interactions.

and since your interact just calls an event on PlayerController(0) you could get weird interactions, for instance 2 chests will interact with each other.

it also looks like you have input enabled on the component, that means when you press interact its calling the event on every component.

my advice is to separate interactions from to your inventory.

Are you referring to the interactionTrace function?

most of it to be honest,

the inventory should just be an inventory and you can add it to anything, players, chests, vehicles etc.

the interaction should be a separate component which likely you only add to you PlayerCharacher.

Chests dont need tick, they dont need interact and i dont think they need your displaywidget?

The display widgets are to place the “inventory screens” onto the hud. Or so that is what the tutorial had said =/

you’d only need one though, your current method creates one for every inventory in the world.

what you’d usually do is have some main HUD on the PlayerController, inside that HUD create an Inventory Widget, hidden by default. on interact update the TargetComponent on that Widget and set it visible

I might find a different tutorial to follow, this guys is bringing more and more issues as I go along =/

its not too hard to fix that, like i said just move interactions to the player.

Will it mean I need to rewrite everything or just move it to player as a function?

When I move it to the character, inventorySystem fails with an error saying its no longer in the blueprint

just move the interaction system, so tick, trace and input to another component or the player itself.

the inventory stuff can stay

you can worry about the widget stuff later.

its not too hard but once you leave tutorial land you have to understand it yourself which can only improve your game design :slight_smile:

This is very true, Ive learned a lot more than I knew before thats for sure, but still very new lol

I suppose the question is, how do I get inventory to compile after moving it? Just move everything have to to with interactions to the character?

yes but listen to the errors, likely you’ve moved something that it still references, so you may be able to delete those if theyre no longer needed or repurpose them.

im away for the weekend so goodluck!

Wonderful, moved the interaction parts, migrated the required variables. Compiles. But now nothing works…

i understand the frustration, you can try a new tutorial but ultimately you’d be better off stepping through the code and understanding it.

your pieces of code all look fine, you just have to put it back together after the move, use breakpoints/print strings to test where its failing if you get no errors