Hi, can you tell me how to check if there are two or more matches in an array. For example, I need to create an item and I check if I have the required resources in my inventory array
Exact implementation depends on how you set things up. But generally, you can loop until you have the number of resources you need (you can save the indexes you found them, save the objects, or just set a boolean, etc. However you want it to work from that point on). So during each iteration, check the name and count to see if you meet the requirements, you can also keep a running count of items found and check on loop finish if you have the same number of resources as what are needed. Or even put the needed resources in an array and remove them if you find them in the loop, then check if the resource array is empty. There are a few different ways to do it but those are just 2 off the top of my head.
Yes thanks I did about the same thing, except I ended up writing the results to a local array and doing a check on the length of the recipe array and the local array