HHHmuluo Posted August 4, 2023 Share Posted August 4, 2023 I want to implement the effect of picking up the items (seeds) inside the backpack in the script, just like clicking with the left mouse button, and placing them under the mouse cursor, but I don't know which method to use. If I implement。 local function TakeItemFromInventory(inst, item) if inst.components.inventory ~= nil and inst.components.inventory:GetActiveItem() == nil then inst.components.inventory:TakeActiveItemFromAllOfSlot(item) inst.components.inventory:SetActiveItem(item) end end I tried this, but it didn't work。 I hope someone can help me, thanks Link to comment https://forums.kleientertainment.com/forums/topic/150179-%E3%80%8Cbeg%EF%BC%81%EF%BC%81%E3%80%8Di-am-an-ordinary-player-and-encountered-a-problem-while-creating-my-own-mod-i-really-hope-to-ask-and-help-solve-it-again/ Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now