Jump to content

Recommended Posts

Hello. Is there some way to get a number of items in the stack ? The stack I want to check is lying on the ground. I want to remove one item from the stack but for that I need to know if the amount of items in that stack is greater than 1 so the script will know if it should remove just one item or remove the target which I'm pointing at with my mouse completely. Until now I was using target:Remove() but I was playing with single items only, now that I want to remove just one item I need a way of determining how many items there are in the stack and possibly a way to remove just one. Thank you in advance.

I know that when i have a stack of things in my inventory and want to use one and remove just one (for plantables files for ex), i use :

		inst.components.stackable:Get():Remove()

I don't know how it work exactly (yeah, code is a little like chinese for me), but it doesn't remove all the stack, just one of the stack. It maybe not applies to your case but could help you to know where to search maybe.

Edited by Lumina

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...