Using the "find" input in lists

So I’m working on an inventory system, but I was wondering about adding a max for how many items can go in one slot. I don’t think I’ll actually implement it, but I would like to know for the expansion of my BRAIN.
For my inventory I have two number lists, one for the id of an item in a slot and the other for the quantity. The problem is, when adding or subtracting an item use the “find” input to get the index of the id that I want to add or subtract.
The function I want to add would select the index of the next stack of the item I want if the first stack is full (similar to Minecraft or Terraria).
My question is if there is a way to find the second iteration of an item in a list using the find function, or something similar that I would be able to use in flowlab?

2 Likes

Whenever you pick up an item increase a number by 1, when you use that item decrease it by 1. (every item would have its one specific number)

I should mention, I have all the quantities in a list (for ease of use and saving).
The problem is when there are multiple of the same kind of object, I don’t know the index of the item to change

Maybe change the index of the object slightly for duplicates? like put a 1 next to it, and then a 2 or something like that?

Using a switch and individual globals you should be able to track if an item slot has the cap of items and turn the switch off.

1 Like

the most ive been able to do is a soft cap. basically it can go over your cap but after it equals the cap or goes over it it will stop adding numbers. (or, in your case, items) i have it in one of my work-in-progress games, it took a while to wrestle out, as i prefer not to ask for help when i can.

please ignore the bad art :sob:

2 Likes

Good art I like it

2 Likes

i dont think that the art is very good. none of it really matches.

1 Like

i think it does

1 Like