Hello!
I am watching a tutorial by DengoJaba (https://youtu.be/AXIJEXaBwd4?si=PZqLIG2K9_qmv7Ry) of which I am on part 4. This tutorial has many watching it very confused as we are running into bugs he is not, and are having to resolve it ourselves. After hours and hours I have fixed most of my issues by debugging, but this final issue has me stumped. It is a spatial inventory system that whenever all room in one “container” is filled it goes to the next. It works perfectly for my “secret container”, however I can only add two to my “debug container” and it says there is no more room.
First of all, my player character does the line tracing to an object in the event graph. If it finds a tag saying the item can be picked up, it references to an added component to my character called “BPC_SpatialInventoryV2” and does the entire object picking up steps from that component’s blueprint. If it does not have the tag, it uses my interaction system for objects that cannot be picked up like doors (not relevant to the issue)
Now in the component’s event graph, it uses the hit actor from the trace to determine if it is defined as interactable by a component class (every pickup able item has a “Interactable component” added to it, it just detects if its there). If it is, then it calls the function “Can add item to inventory”, where I believe the issue is coming from.
Finally, “Has Place for Item in Cell” The main area where I believe the issue to be coming from.
I get this is a lot, and this is more a shot in the dark. I have been working on this for ages and I am not ready to just give up on it. I know it is hard to just go off of images, so if anyone wants to hop on a discord call to try and fix the issue in real time I am more than happy.
This is a LOT of code that is dependent on a LOT of other code.
You may get lucky with someone who has the time to sort through all this, but it looks like hours of debugging for the person who may help you.
If you (and a lot of other users) have been having issues with the system that the tutorial has placed, then it very likely is NOT a stable system you should be using.
If you don’t already have some experience with inventory systems, starting with one as complicated as this is ASKING for trouble.
I would start over, and look for less complicated systems to learn and/or try to create my own (assuming you have a strong enough handle on programming in Unreal to do so).
If you insist on using this system, which seems obfuscate to you, then add PRINT STRINGS to all landmark codestrings so you can keep track, on screen, of what your system is doing and when.
As it stands, your issue could be any and/or all of the following:
Order of operations
Human error (a misconnected node, a spelling mistake, an incorrect reference)
Deprecated or misused nodes
Shoddy programming
Adding PRINT STRINGS will help you diagnose this. But, again, if you don’t fully understand what you did, you will NOT be able to fix it.
I am definitely a novice when it comes to UE not an expert by any means. This is how I learn is I throw myself into hard ■■■ situations and try to learn from it. It takes a long time but figuring it out is the fun part and how I’ve approached any hobby. All I know is with enough time, effort, and open mindness ill get it.
You’ll get it, but you need to take care not to bite more than you can chew because MOTIVATION is a huge part of being a successful developer.
If you keep hitting snags, eventually that can demotivate you to continue.
At least 90% of people (and I KNOW it’s higher) start Unreal, realize how much effort it is to do the simplest thing, hit a snag and ask the Forum, perhaps get spoon-fed the answer, and then never touch the application again.
And I know, in the beginning, you feel like you have all the time in the world, but when you start to make this a more serious venture, you really do learn that you have to optimize your time and cut losses; this may be such a case. Pezzott1 may remedy that.
Incredibly wise words and I cannot agree more. My issue is I lose motivation both from taking too much at once and taking too little and getting bored with no challenge. Pezzott1 sat on a call with me until almost 1am for two hours helping and he did eventually fix the issue the absolute legend and ill post my findings on this feed for anyone also confused based on the tutorial this is created from.
This is for the Event Graph. This is where my code begins to be a little different than the tutorial as I used a interaction interface so F had to be pressed while looking at the object to pick it up rather than his method. You can keep his method of picking up using the “TraceInteractableObject” method he used in his tutorial, which works, I just needed something different for my project as seen here:
The SpatialInventory Component seemed to be causing all of the bugs, and this should cover all the code from there, just try and match the code and see if it fixes your issue. If not, send me a DM and ill share some more of my code.