hi
i dont know how hard its gonna be but im following this tutorial about spatial inventory (Escape of tarkov inventory) and i dont know where i have been going wrong exactly but when i try to pick a item up, it doesnt show in the inventory. (the image/icon)
I’ve been through that tutorial. One note I have related to Get Default Item Object is that the tutorial says to make it private but a child can’t override if it’s private (at least in 5.1.1) (so it should not be private).
That could be the issue?
Otherwise there’s any number of places it could go wrong, so I’d start tracking it down with print strings, to find where data is first missing, starting in the item when it gets picked up. Can it print the class… if not… it’s somewhere before that.
hmm i tried to unprivate “Get Default Item Object”, didnt seem to work, however it seems like their is alot of functions not working for some reason, specially when adding, inventory works fine, like it shows the screen with the grid, but only thing is that the icon is not showing up
for some reason when item is trying to validate, it returns false and the Set is unknown, feel like that is also one of the reasons why it doesnt work and if that is the case, how should i solve both set variable and valid checker?
ok i think i might have 2 problems (the replay above this is one of them), in “get icon image” , i have tried to cast and set the variabel but it only shows “none”. im not sure why its shows me none
That suggests somewhere prior to that, ItemObject isn’t getting set.
I’d check the item on the ground before getting picked up, see if I can read ItemObject on overlap.
The hierarchy is ItemObject > Item > Item child > Widget, so I’d check the child.
Now mine is heavily modified, but I see some difference in the item widget:
I have Set Icon Image, which sounds important. (Could be that you’re using a binding. I’m not using a binding. That is probably something I changed because a binding runs every tick and isn’t necessary.)
A side note, Delay Until Next Tick works as well, but then also I see your delay is set to 0. I imagine that’s something I tested, usually I would to see if or why a delay is necessary, so it probably is for some reason.
i tried to make it look like yours, doesnt look like it works and what do you mean by about the binding, do you mean that i shouldnt override the function and instead create a new function with the same nodes? (either way it didnt work)
If you added the delay and have set icon image implemented, well I would see if the ItemObject contains any data there. You can add this Print String (which should print the icon name whenever the inventory changes):
ok so by my understanding the “get all items” (in the inventory component) function, the local variable that is used for set is not printing out, so i guess get all items doesnt run or it seems to only run half way cus it checks if the local variable is valid and then doesnt proceed to the “branch” and “add”
although it goes to the next function/node outside of the “get all items” function, not sure if it went through and checked or if it failed to check half way (on branch in get all items)