Unreal Engine 5 Tutorial - Inventory System Part 14: Dropping Items
Вставка
- Опубліковано 9 лют 2025
- We are revisiting one of my first series on the channel; the inventory system series, this time with different implementations, improvements, and now in Unreal Engine 5.
In Part 14 we add the ability to drop items on to the floor.
SUPPORT ME
Patreon I / ryanlaley
Buy Me a Coffee I buymeacoffee.com/RyanLaley
Donations I paypal.me/ryanlaley
PRIVATE 1-2-1 SESSIONS
Email me at support@ryanlaley.com for more information and rates, or visit www.ryanlaley.c....
JOIN THE COMMUNITY
Discord I / discord
FOLLOW ME
Twitter I / ryanlaley
Facebook I / ryanlaleygames
Instagram I / ryanlaleygames
Hot fix (maybe) for the bug at 8:55 , that if you keep pressing the -1 button it's gonna keep spawning items, Hotfix is : in place of putting 1 as quantity, use the local quantity and clamp it between 0 and 1
this worked fine for me, ty
Ty !
You get problems doing this when the stack is more than 2 and you want to drop one. The way i've fixed this isses is to create an addtional branch before the set member node and check if the subtracked quantity value from the inventory array is greater than 0. If it is, set the member, if it isnt, bypass it onto the next branch.
@@SphireUK i understand, i haven't had any issues yet, with my way
maybe i over complicated this lol I added a new input into "Server_remove" for the action menu, and created an integer output for the "Remove from inventory" function. I added a 3rd sequence to run at the end, where it outputs the quantity remaining, and if it was 1 then i told the "Server_Remove" custom event to remove the action menu from parent. But it works fine, turns off the action menu once you drop everything.
Edit: I added an or boolean after the "Remove from inventory" function in the "Server remove" event and a new "DeleteAnyway" boolean output for the "remove from inventory" function. So, if it reaches 0 remaining via drop 1, Remove whole stack, or is consumed. All of these will turn off the action menu once clicked
So i did the thing with fixing duplicating items after dropping them differently, but in case anyone needs a simple solution here you go!
Disclaimer, i am by no means an expert, but this worked for me.
Go to your action menu where you put the button click nodes, add "remove from parent" at the end.
That way every time you click a button it keeps you from spam clicking it, so when it reaches zero you cannot spawn any more.
Hope this helps!
If you're doing this in thirdperson you can drop the line trace. Just Get Player Character - Get Actor Location - Break Vector and add a random float between + 50 and + 100 on X and Y, and something like +20 on Z, and then put those into the return node.
So how many pins are going into the Return that are a float?
@@thefactorycreek Three floats, one for X, one for Y and one for Z.
For everyone that has the issue of not being able to close the inventory without first having to click the screen, in your playermenu and containerinventory widget event graph put an "event on mouse enter" into "set focus" with set focus target being "get a reference to self".
elaborate?
Thanks a lot, I've been smashing my head against the wall to get rid of that one.
For those who need more details about how to do it:
Open your W_PlayerMenu blueprint → If you're in Designer Mode, switch to Graph (top right of your screen) → Right click on an empty spot and type "EventOnMouseEnter" then select it in the list → Right click on empty spot right next to the node you've just created and search for "Set Focus" then select it → Link "EventOnMouseEnter" to "SetFocus" using the exec pin (the white triangle) → Select those two nodes and press "CTRL" + "C" (to copy them) → Compile and save → Now open your W_ContainerInventory blueprint → If you're in Designer Mode, switch to Graph (top right of your screen) → Find an empty spot and press "CTRL" + "V" (to paste) → Compile and save.
Now it should work :)
@@Ebullience Just go to your event graph on both the playermenu widget and container inventory widget and add a 'On Mouse Enter' event, and from that output create a 'set focus' node, then drag out the blue target pin on that to create a reference to self.
That an adequate enough explanation? Once you add that onto both widgets event graphs, it should work. It fixed mine.
TO FIX THE BUG that causes apples to keep dropping after the stack is empty do this: in the inventorySystem > RemoveFromInventory, AFTER the first branch (from false) add this: >= node with LocalQuantity on the top and 1 on the bottom (meaning if the stack contains more than one), send that to a branch with true connecting to the Set members in FslotStruct (and the rest of the code) and the FALSE cnnecting to a return node.
This will fix the error of dropping items when the slot empties out.
Brilliant fix there :). Im also having an issue where I cant get out of my menu without clicking the widget. If I for some reason click out of the space where my menu items are my "E" (from the Chest) and "I" (normal Inventory) doesnt work. I ahve to click in the box first,
@@DexNeXuS1 I'm having the same issue, nott sure what is causing the issue but I am looking into it, i'll update if i find a fix :)
@@WarpaintStudios Honestly that woudl be great if you could wow I mean Im new to this but Im seeing if I can find something about this. Can be hard if someone doesnt see all the blueprints though I guess
@@WarpaintStudios okay very very very very easy fix. I just logged on now and just though... hmm the grid is what you can click and everything else you cant... I just made a new grid called it background and scretched it out and made Opacity 0... yeah works now :D
@@DexNeXuS1 Main inventory widget which is holding all inventory widgets need to be set to is Focusable. Because it has full screen canvas panel.
Works. Amazing. Not amazing that it works, but amazing that it works for me. This is just fantastic for my learning.
Another add to everyones hotfix that works code side is to run a check inside the action menu after drop one to see if the inventory slot selected has anything left. Get the 'inventory component' and the content array, do a get using the index in the action menu, split the pin and check if the quantity == 0, if so remove from parent
Hot fix for the bug at 8:55. Create a new function in the ActionMenu take the vertical box and node Get Vbox > Remove from parent and then add the new function to the end of the on click event
This is great and it worked, wondered if you had come up with another way that doesn't involve removing from parent?
THANKS!
Worked, thanks!
I have to click the inventory to exit it again if action taken or I have clicked outside the box. Have I done something wrong?
set the root container to visible
@@MostafaAhmed-lj3vp The top one, in this case its W_playerMenu, just set that to focuable and it fixed everything for me
@cyrez Which root container PlayerMenu, Player HUD,Inventory Slot, Chest Inventory are already visible
Please tell me which one should be visible and focusable and which one not
inventory slot = visible focusable
inventory grid = not hit no focusable
like this (ik i am asking a lot but it make things easier for me to understand please please please please please
Remember your fix?
@@ruellerz barely, but if i had to go back and guess it would be either the one above canvas, or just canvas itself, then set that to visible and to focussable
If anyone is having trouble picking the apples up off the ground I fixed it by tweaking it's collision: open Apple BP, select apple mesh, set apple's collision preset to "custom" then checking the "block" box for "interactive" amongst the list below. (It's the same settings Ryan had us do for "TESTItem") I imagine it's supposed to transfer over when made as a child of the TESTItem BP, but for whatever reason it didn't for me. Hope this helps.
I went struggling as my DROPALL didn't want to work, and I could drop infinite apples. It appeared later that I had connected my SetArrayElement to the second branch, which holds the Server Drop Item. I rewatched the video many times I couldn't find out what it was, but after a few times I noticed the nodes closer and I changed it from ending branch to middle branch and it worked. I made a mistake, I scanned, and I found it. It's a small victory in my learning journey, managing to solve tiny-ass bugs. :)
i did something very similar on part before
sometimes in software, the "tiny-ass bugs" are the ones that take the longer to hunt down and solve. I have seen a bug being tracked by multiple teams for like 6-12 months and it ends up being the dumbest typo in a function that has 1 reference and it was from some super old spaghetti code some intern 4 years ago wrote to change a UI element's background color. Sometimes a system will work for months or years until an update causes one conflicting value to null out and breaks an entire section of the server or website. What you did may seem dumb and simple but in the real world diagnosis is a very important and valuable skill.
For anyone who is having some issues with this tutorial series heres how I fixed mine. Go to editor preferences and in the search type in client and set the Primary PIE Client Index to 1 instead of zero. not sure why it fixed the issues with mine but it did. Also make sure you follow step by step because this guy moves quick and it is easy to miss some stuff.
Thank you
So with this current method of dropping items, there's an need for >= 0, right before you set fslot members, otherwise when you " drop 1" you can keep dropping an infinite amount, coming from the from the quantity that is set to 1 off of breakfslot struct, do a greater equal node, set it to 0 and plug it into a branch before set fslot members, and coming off of true it'll go into fslotmembers
Worked perfect!
My items work when i consume or drop it the only problem is when i drop it, it doesnt show! Please help!
Fix: Go to data table and add item class. I was to tired and forgot lol.
You have a branch problem. You hooked something to true, its suppose to be false.
HI, when I pick 1 and drop 1 it´s fine. However if I have 2 items picked and I drop 1 , the item is removed but I can´t see it again. thx
To those who use their own drop location distance 13:58 and have an issue with items not "spawning," they probably are, and are just spawning at world origin because the trace didn't hit anything, to fix this, add a branch after the line trace, connecting the on hit to the Boolean, if true, proceed as normal, if false, set the drop location to the end point of the trace
I'm having an issue i have max stack set to 3 and when i pick up 3 one at at time i get a stack of 3 then I pick up 4 and i get a stack a 3 and 1 and then Finally on 5. My stacks are one stack of 3 and one stack of 4.... so for some reason on the 5th pick up it makes a stack of 4 and im unsure what to do to fix this.....
Will there be a tutorial on making different menus depending on the item?
I can't seem to get my drop all button to work for some reason. I went back through the entire video and don't see that I missed anything. When I click Drop all, nothing happens. I thought maybe it was from the custom event in the W_ActionMenu graph but it seems to be correct. I also checked to make sure I named the Drop All button correctly in the designer.
Okay im stuck. I have 10 apples in chest. and i have 1 apple in the world. I get the 10 apples from chest move them to player inventory, then i go pick up the 1 apple it deletes the 10 and only shows that i have 1 apples instead of 10 in player inventory. it should have 11 right? 10 in a slot and 1 in the next slot
Same, I've set multiple on the ground to pick up, but it never updates so I only ever have 1 apple. So even through I've picked up 5 I only drop 1 right after.
Hoping to find a fix for this!
Nice got it working but its janky atm. i need to figure out how to make the interaction more precise. rolling on apples and cant detect them right away.
When I drop one item, it appears on the ground and disappears from the inventory, but when I drop everything at once, the items don’t appear on the ground. What can I do in this case?
Have been loving this series and I finally got to my first wall with it. I have gone through this video over and over again for days and cannot figure out why my dropped item loses all interaction. I've checked and double checked and triple checked and am at a total loss. The dropped item simply will not interact either with the line trace or with the interact function.
Ever find a solution for this?
@@dillon.b6396 It had to do with my static mesh. When I picked up my original object it was on a higher elevation, when I put it down, it was at ground level. My trace was going right over top of it without hitting the collision.
GUYS CAN SOMEONE HELP I HAVE A PROBLEM I can't close the inventory again after i opened this action menu if someone can help me for that ?
ALSO WHEN I PRESS THE DROP ALL BUTTON THE ICON DISAPEARD BUT THE APPLES DON'T GO ON THE GRROUND THAT's weard
Yeah I'm having same problem as well. If I don't drop anything I can close my inventory just fine
I have the exact same issue, it drives me crazy@@lordyingyang
I have to click on the Investory than it works. I thing the mistake was in another Episode. Because same problem with the normal Inventory. If i open Investory then click with the mouse on the game World. I cant close the inventory
The mistake was in Episode 6. Go to the Player menu widget an then on canvas and visibility change to visible. Same with the chest widget. Go to canvas and change visibility to visible
I dont know where I went wrong but my "Drop All" function doesnt do anything. And it will stop my "Drop 1" when I have 1 apple left...
same did you figure it out?
Solved it
@@N-dj4sj how ?
@@N-dj4sj how did u solve it ?
@@N-dj4sj How dare you, give us the answer!
Cant drop items at all? Following tutorials in order and havent hard a problem until now
Blueprint Runtime Error: "Accessed None trying to read property InventorySystem". Node: Server Remove Graph: EventGraph Function: Execute Ubergraph W Action Menu Blueprint: W_ActionMenu
Hey, did you ever find a solution for this?
I'm sorry no I did not. @@IllBeDARNd
inventory slot widget -> on previev mouse button down -> create widget action menu -> plug in inventory componet there check if it has 2 boxes checked like all the other
@@chmur8589 i will check if this solution works and get back to you, thankyou for the response!!
@@chmur8589 didnt work for me
Hi, have anyone an Idea why my actors always spawn in the ground at half and not above? thank you. I made all in thirdperson and not in first, at spawn location I´ve changed the Z position already but it´s the same problem.
Several things to do to solve the bugs (for me) : add an output "EmptyStack" to the function RemoveFromInventory, set it to true for the branch "RemoveWholeStack or local == 1" in the InventorySystem. The return node should be placed after the MC_Update. Then in your ActionMenu widget, just add RemoveFromParent after the on clicked DropAll, and add a branch after the on clicked Drop1. If EmptyStack is True, Remove from Parent. Clean
nice nice, but how did you get the EmptyStack variable from the InventorySystem into the ActionMenu widget?
ahh figured it out, promote 'EmptyStack' into a variable in the inventory system and then get that variable in ActionMenu, target: "InventorySystem". and there should also be two return nodes after MC_Update, one true and one false. Thanks, works like a charm!
What did this fix?
it just makes it so the action menu closes when there is no more items to drop@@dustinsmith8341
@@dustinsmith8341 😂same question...Budd having solution for unknown problem
Hi thanks for the videos, the Drop qty 1 button does not stop I put a Branch at the beginning of the Remove function that if the quantity > 0 works if not stop. i think it's nicer that the W_ActionMenu disappeared but my tests don't work.
I was having an issue where after dropping the apples in the menu either 1, or all, that my in game screen would lock up and not responsive anymore. After attaching a "Remove from Parent" node to each of the 3 "Server Remove" nodes the problem was solved. I don't know if this is the right way to fix that problem but it seems to work for me. But I still have a problem where I must click inside the inventory midget in game to allow me to use the "I" key to close the inventory widget. Advice would be appreciated. Thanks!
Widget....not midget....bad spelling.
Yo, I tried to test my "Drop 1" button and not only does the item not spawn, it won't let me close the menu. I dunno what I'm doing wrong. It doesn't get that problem otherwise.
EDIT: So, I discovered that I have to left-click on one of the slots AFTER dropping the item before I closed it. That saves a lot of stress on the latter part. Item's still not spawning, tho.
I am having the same issue. It sounds like maybe the focus is lost when the action menu is used. So when you drop, it focuses the action menu, but when the action menu disappears, the focus doesn't go back to the inventory unless you click it. Maybe just refocus the player menu after destroying the action menu.
@@Dont6x9Panic How would we make it refocus on the inventory after?
@@joeanrachelmiller6529 did you find any solution?
@Witherbrine98 do you know how to refocus on the inventory?
Im having the same issue. is there a fix to refocus the inventory menu after the action menu disappears? I've tried everything i can think of but I haven't managed to get something working yet
Is there any way to drop the item as a stack? Wondering how I can do that
Thank you so much
I'm experincing a bug where if I click on any of the Action Menu buttons I can't close my inventory window before click on a slot first (assuming a Focus issue)
did you ever solve this???
The mistake was in Episode 6. Go to the Player menu widget an then on canvas and visibility change to visible
Same with chest widget
@@unrealversum7729 True. Now I can click anywhere on the screen. Now I have to fix the action menu bug where I have to click anywhere after using the action menu. Suggestion?
@@erksipa bit late but if anyone in future has this issue, ua-cam.com/video/s43LDfKNGc0/v-deo.html
Iv been though the video 3 times. Nothing is dropping ---> Blueprint Runtime Error: "Accessed None trying to read property InventorySystem". Node: Server Remove Graph: EventGraph Function: Execute Ubergraph W Action Menu Blueprint: W_ActionMenu Why.
**Fix** Didnt reference inventory system in Invenotory slot Update.
I ended up doing the old old inventory system back in UE4. Could most of this be applicable there? I didn't really see data tables used in that one. Mostly I want the ability to add remove things from the inventory and the drag and drop functionality. But I absolutely don't want to break the old system.
Just couple things I found
To resolve an issue being able to lose focus whilst inventory screen is open by clicking off, which causes input to no longer work unless you click back on it, I decided to change the visability of the Canvas on the player menu from Not Hit - Testable (Self Only) to Visable.
However this causes a issue where if you click the drop or drop stack button but don't move your mouse off the button you are able to repeatly press the botton and drop more items.
To resolve that I ended up adding a Remove from parent call after the SERVER Remove all on each of the button event handlers.
Maybe there's a better way, but it works.
Another thing when Ryan creates the new apple by using the Create child Blueprint class he ends up having to enter in the pick up display message in the overriden Look At in the apple Blueprint, which isn't great as its overriding the base implementation that creates a message based on the Item ID. If you had lots of items you would have to enter a new message for each.
To fix the issue remove the overriden interface implementation in the Apple Blueprint that way it will call the implementation in the base class.
first solution not working (refocus widget)
Has anyone else ran into the issue where when they go to pick up apples off the ground it only counts 1 and deletes the rest?
I have 5 in front of me but I'm only getting 1 in my inventory when I pick it up. Any help would be appreciated!
need bugs fix. after branch remove stack if true drop all , if false need delete "set members" and chose "set array element"
"So, let's get started" - honestly love this moment!
What if I wanted to Drop x10 items only from the stack?
How do I get the total amount to reflect that x10 was removed?
Pick up works fine when apple is a cube, but when its an apple mesh, or after being dropped, cannot pick them up again. This is in 3rd person by the way.
Also get this error:
Blueprint Runtime Error: "Attempted to access TestItem_C_UAID_7C10C943792DFE3702_1226757280 via property K2Node_CustomEvent_Target, but TestItem_C_UAID_7C10C943792DFE3702_1226757280 is not valid (pending kill or garbage)". Node: SetOwner Graph: EventGraph Function: Execute Ubergraph Inventory System Blueprint: InventorySystem
Make sure your child is set to block interactive trace.
I somehow have a bug where when the client drops the item it doesnt show up except for on the server side, I tried moving things around and am able to get it to drop both on client and host but the client now never deletes the prior drops. Anyone have a solution?
I have a weird error for dropping an item. I can drop items from the box(container) and from the player inventory but when I pick up the item from the level and drop it, it spawn none. So the dropping system works only if the items are from the container not from the level I picked up. Anyone know how to fix this?
How can i create that look function with Thirdperson character? Bcs i cannot pick up the apples from the floor when dropped, bcs of my Thirdperson
Also couldn't pick up the apples off the ground, but fixed it by tweaking it's collision: open Apple BP, selecti apple mesh, set apple's collision preset to "custom" then checking the "block" box for "interactive" amongst the list below. (It's the same settings he had us to for "TESTItem") I imagine it's supposed to transfer over when made as a child of the TESTItem BP but for whatever reason it didn't for me. Hope this helps.
Add a camera to your follow camera. Place it on your characters head. Angle it to look at the ground. Create a player ref. Get whatever you named your camera and then do all the math nodes like in video. Trace will come from that camera down to the ground
I'm sure what I did, but my items don't disappear upon drop until I close and reopen the inventory. Anyone know what I'm doing wrong?
Hi Ryan, Why can't I stack more than one apple?
If I take the 10 out of the box, it works. However, I cannot duplicate actors and then stack them.
Check tha item stack size in the Item Data.
Hey Ryan I got a quick question, I've been searching and I can't seem to find a way of doing inertia properly, I know about the max acceleration which does a good blend of character speed but to slow down I don't understand how to stop making the character stop on a dime from sprinting around 600uu
maybe try the Braking Deceleration Walking in the character movement component
So... I've been doing this in third person. Where were the settings for picking up items? cause right now its how far away the camera is from the item.. I need it to be the player.
You just have to attach to collision sphere to the player mesh instead
@@TheP1x3l How doe sone do that? I am having the same issue. If i make it a big cube it works in 3rd person, but if its a small item, and usually from quixel bridge, I cannot pick them up even though the code is there.
the drop all button is not working and the drop 1 button won't work if the quantity is 1, anyone got an idea of whats going on?
Fixed it, I had put the set array element on the false side of the beach when it was supposed to be put on the true side, everything is working now
@@rayaankhot6780 Hey same issue, where is the array located?
@@intrepidoak2618 Its in the remove from inventory function
So i can only drop items if the stack size is more than one? If I try to drop an item with a stack size of 1 it disappears. And drop all also removes them from my inventory but they disappear as well.
My issue was using the mentioned hotfix for 8:55 on the wrong local quantity.
Is it just me or can you just spam the drop button and spawn infinite items?
I have it too any fixes?
@@Tommyboi7566 one way to get around this is deactivate the widget after clicking it
Just add a simple delay between clicks to prevent that
Had the same bug, for spawning the actor just set the actor class in the item data table
So it can spawn from the class u gaved
I have an annoying bug where everything works fine except for the client side dropping items and the player inventory not updating until the drop option is pressed more than once. Thankfully when the drop option is pressed more than once it doesnt keep spawning items. So any help would be appreciated. I have checked all the update bits and its all set up right. And the server side works perfect so I am not sure what is going on.
This broke my first player, any update or fix ? this is driving me nuts, basically all the clients cant drop??
I was having an issue with the items spawning in the ground, which defaulted them to spawn at 0,0,0 (world origin). My fix for this was to remove that random cone and to just have the actor forward vector multiplied by a random float in range 200-500, and then on the subtract portion, I expanded out the subtracted pin and put a random float in range (-50 to 50) for the X and the Y but left the Z to 100.
your using an add node instead of subtract. you subtract 500, not add. i had same problem. easy fix. your comment got me on the right path to figuring out my problem. I couldnt figure out where the damn apples where going to, they were just disappearing lol so i investigated your 0 coordinates and removed the walls and bam there was my freaking apple spawning in the corner
Hey so I don't know if anyone else is trying to figure this out, but I'm struggling to get this menu to close itself when there's no more items in that slot (otherwise the player can just keep dropping and duplicating the item). With the drop all function I was able to add a "Remove from Parent" function to get rid of it. But within the action menu widget I have no idea how to tell it to close itself if the item quantity in question is zero.
Also I've noticed that you can't close the inventory again after you opened this action menu unless you left click on the screen? Is anyone sure of what is causing that? These tutorial videos are great, I just feel incredibly out of my element with Unreal Engine and I'm unsure of where to go.
I actually fixed the drop item and consumption problems, so incase anybody wanted a solution:
Go into your inventory system and look for the Server_DropItem function, then create a "!=" function using the Item ID node. Make sure section B in this function is blank, then feed this "!=" into a branch, and make the branch the first thing that Server_DropItem has to go through before doing anything. Working on the closing inventory inconvenience at the moment!
@@bughousegames9597 I checked your method, indeed, after all the apples disappear from the slot, it stops generating new ones if you continue to press the "throw 1" button. however, if you continue to press "discard 1" with an empty slot and then exit the menu and pick up the apple again, then he puts them in the next slot and not in the first slot, although it is visually empty, and if you do this all the time, he will take all the slots with something invisible and eventually stop picking up apples.
@@bughousegames9597 Dude i also that i can't close the inventory again after i opened this action menu do you have a mathod for that ?
Can someone help why when I drop the items It drops on my left side not the front.
This is likely because in your Inventory System or Inventory Component (however you named it) in the 'Get Drop Location' function, you added '500' to the X or Y axis instead of the Z axis. Have another look from 13:30
@@judgejames830 mb bro. I already fixed this. my problem was not because of the code. Apparently in my player im using orient rotation to movement, so when I move even tho I am on first person. My player is rotated somewhere and the dropped items properly drops at the front of the player . but my mesh is rotated . haha
@@charleskelvinamacanin8197 glad you fixed it, nice job :)
Anyone know why it doesn't spawn the actors on the ground for me? If I drop 1 it does work... Sometimes at least
I had same issue. Check 16:30 mark - make sure DropAll's Remove Event "Remove Whole Stack" bool is checked, and "Is Consumed" bool is unchecked.
@@WestinsWorldStudio damn this would’ve been useful 6 months ago
question. After I threw out the apple and the "action menu" disappeared, the "player menu" does not close by pressing a button on the keyboard until I click on it with the mouse, only after that it closes. How to fix it?
Thank you all! this question is no longer relevant, I found a solution to this problem on my own
@@Madway_tv Can you give me the solution? I have the same problem.
by all means. don't tell anyone what you did.@@Madway_tv
@@KenLinx Did you ever figure it out?
@@CleanEditHQ Yes but I don't remember exactly what I did. I believe you have to add "remove from parent" to it or maybe on-focus? Sorry, I don't remember the specifics because it's been months. I do believe you can find the solution in the comments or in the following tutorial videos.
Dropping the items works for me. but for some reason I have to double click instead of single mouse click to make it work
Yea, me too, anyone got a solution for this?
Same here
I had this also, figured out why. Very easy fix. @15:36 or so, in the W_Action Menu -> Event Graph, when he does the BTN_Drop "On Clicked", instead use "On Pressed" for a single click, leave it "On Clicked" if you want the double click. Do it for the Drop All, and Use button "On Clicked/Pressed" events to choose whichever you want.
Are the items not replicating upon drop on the client for anyone else?
Hmm, I've gone through the video twice now and I am unable to solve my issue. When I open my inventory and have a stacks of apples, I right click on them but none of the buttons cause any of the apples to drop. Anyone have a similar problem after seemingly following every step?
I had same problem, I checked the "GetDropLocation" function in the inventory system and I had hooked it up wrong, after fixing that the items dropped
@@vizorsnixhave you tried this in other slots? My 1st slot works great but if I move apples to a dif slot the only thing I can do is the drop 1 and I can infinitely drop apples
Hi @@bradennichols3154 , that seems like a different issue than the one above, maybe the comment by zatic will help you with infinite apple issue. there's also a comment by ibrah95 where he mentions you can make it so the action menu automatically closes after the last apple is dropped, so you can't keep dropping them. Good luck!
After adding multiple items, setting their class, interface, look at function, and all, I can only drop the item if it is in the first slot of my inventory?
I'm not sure if this bug is just me, but it's there.
I don't have the same problem.
I have this same problem. You find a fix? Or figure anything out?
Has 1 apple.
Drops it.
Apple with 0, remains.
Drops it.
No apple
i created another child off of the parent item. called it testtest, set its mesh to cube, set the datatable, set its datacomponent.
Which ever item is set to drop seems to stick to the drop button. The only fix seems to be ending the program. How would I debug that?
Sleep my friends, sleep is the diagnoses. Inventory slot > create widget action menu... I input quantity instead of index...
@@joeanrachelmiller6529 Sleep is very important in game development
Having a problem with this. Everything works great, but only if i have the items in the 1st top left slot. If i move apples to another slot i cant use, drop or drop all. Also its the same with the chest inventory. Only 1st slot is functional
Sounds like you might have a Return node hooked up inside of a For Each loop somewhere. That's typically whats wrong if you have something working on only the first of a list of things.
did you happen to figure this out im having the same issue
@@ramitin_ha1090 I did. But your not gonna like it. It came down to using the right, correct variables. Have no idea which one it was. I just went through every variable I could find and looked if there was another one I could try. Also noted I started from scratch 5 did times on the project until it worked
how can i remove a weapon from an item of the same class?
So I have a odd problem. In my Item data under apple if i try to change the Item class to an actor it just ignores the input all together as if i never selected anything in the first place. Ive tried using The Test Actor and the Apple Actor it just stays as none. I'm using 5.3 and Ive restarted the program and my computer with no change. Anyone know a solution to this?
I'm trying to emulate your issue and see if I get the same thing but I cannot. I am able to select the generic "Actor" for item class of individual items in the ItemData table and it doesn't have any issues. The issue might be in your F_ItemStruct. Make sure the ItemClass is set to the generic Actor. Considering this is the first time we've used the ItemClass option from the ItemStruct, you may not have seen this issue arise until now.
@@dustinsmith8341 Thanks for the reply Ill have to try that out ill let you know how it goes. I also noticed it wouldn't let me use the thumbnail i created either. oddly it lets me select pretty much any kind of actor or Texture except the ones i created in this video. It worked just fine in the beginning when i first created Test_Actor and the Texture. I'm going to create another Texture and see if that corrects the problem for the thumbnail. I don't have a lot of Ram on this PC so it might have become corrupted due to the occasional crash.
Alright so the icon change worked. I created an actor named orange out of the box no changes probably requires changes in order to be select as an actor by class. As of right now its still treating the orange that has nothing in it the same as the Apple. It wont allow me to select it
I tried the Actor object instead of class but i don't see a means to specifically select the Test Actor the tool that you would drag to point out the Actor is Null. And I cant seem to figure out how to select actor via Viewport
At this point I think ill just go ahead and re watch everything to make sure i didn't miss anything. i force deleted the Fstruct and the data table a few days back and reconnected everything manually but cant seem to get Event interact with/ player character to find the Inventory system in the Item Data Component. I tried to add the inventory system to the third person character but still got an error. trying to debug only helped me make things a larger mess lol.
my slot removes when i open the inventory again
Anyone else run into the problem where you can't remove the last item, and remove all doesn't work?
IF ANYONE IS HAVING ISSUES WITH INFINITE SPAWNING APPLES, MAKE SURE YOU HOOKED UP TO THE CORRECT BRANCH WHEN ADDING YOUR DROP FUNCTIONALITY, IF YOU HOOK UP TO A "IS CONSUMED BRANCH" YOU WILL NOT GET THE STACK TO DELETE. I don't know how i made this amateur of a mistake but hey that's why im on youtube.
Yeaaa so when I click the drop all button, it will random teleport me to another level.. When there is only 1 inventory, the item won't drop...
lololol
I have a bug. after dropping the items and then picking them up, it pickes them up as seperate objects
Sounds like somewhere along the way you have ended up with 2 seperate items, one that is set to stack and the one you are spawning when dropping is not set to stack
I have something, possibly related. When I spawn the actor of the class, it loses its item information. I get a default "NewRow" as my ItemID rather than the one from the beginning. Not sure what that is yet.
Can you please help me with a question? I cannot find any info on this anywhere and have been stuck for weeks. How do I write a script for my NPC/AI to come to my restaurant and order a randomly selected meal. Sit down and leave afterwards after paying.
Simple behaviour tree could get this to work. Id probably make an AI Task enumerator with certain tasks, "Find seat", "order/eat", "Leave". Spawn it in "Find seat" and have it pick from an array of seating locations and move to that location, once there it set it to the "order/eat" and all you need to is have it pick from a random dish array and set it to wait however long you want it to wait for. Once that time is reached, switch it to leave where all you need is to give it a "move to" location to an exit.
If anyone having issue with infinite apple drop bug whil you are pressing single drop, there may be many many mistake in you your nodes you can try solutions from other comments here but in my case in inventory system - Remove from Inventory - first branch - false, where you need to use 'get ref' rather than 'get copy' connecting to content. Thats my bad, am idoit in hurry i was skipping video.🙃
He says get a 'Copy' though? doesn't he?
I can infinitely drop items as long as I click the drop 1 and don't get off of the UI when doing it
I solved this by using 'get a ref' node from the content (instead of get a copy) in the remove from inventory function
@@benjamin71965 this didn't work for me.
@@benjamin71965 this solved it for me 5:03
Im having an issue with my drop 1 button, where it always runs the for loop after Event Drop Item 3 times. Any ideas?
I solved it. Rubber duck moment, I was subtracting -1 instead of 1 for some reason
Lol...My mind got confused with that part as well. I got it before trying but at first made me think lol@@cauldinkyle6359