Hi there, I’ve been asking in the UnrealSlackers discord and had some help but it’s not quite there yet and I can’t seem to get any further responses so I figured I’d try here too.
basically: I need to search a data table of recipes for crafting, and match one of the rows to what is in an array.
For context: The array I’m trying to match to the data table item is a set of crafting slots. So when I drop an item from my inventory into the crafting slot, it searches the data table for a row that contains just the items in that specific row and outputs the row as the return.
Here are some images for better explanation -
So here is the menu that includes the inventory on the left and the 4 crafting slots on the right -
So in a data table of crafting recipes I have a variable that I can specify the items required to craft something as seen here -
And this is currently how Im searching the data table to match to what’s in the crafting slots:
The problem as of right now is that when i drop an item into the slot it finds what it could possibly be but only based on 1 of the items it finds. So The recipe for the sword is 1 Health Potion and 1 Mallow Squidge. So if I drop those items in it outputs correctly -
But as soon as I add another mallow squidge on top of that, the output changes from a sword to bread because if you reference the recipe list, bread costs 2 mallow squidge although it doesnt require the health potion, so It shouldnt be outputting bread it should still be outputting the sword despite the extra quantity of ingredients.
So my question. Am I doing this right or is there a more specific way to narrow down items in a data table to match to an array (the crafting slots)?
Thanks for reading this far XD I’m a very explanatory person when I need a question answered.
Hopefully you can help.