Firstly is there a neater way to for something that has to do multiple boolean checks e.g multiple branches. Currently I check an array too what item is in a inventory slot. If the name of the item is true it will fire. If false It will move onto the next branch in a long list. Some checks has 20 items to go through and thus 20 branches which takes up lots of space. How can I Make this cleaner?
Then secondly depending on which boolean triggers each item costs a different amount of money. How can I set the money to a different subtract per each bool instead of having to make a seperate Substract and Set everytime.
When its just a few items this is okay. But I want to scale up to thousands of items and values which will take way to long to do each item like this and not enough space on the graph to track it all
Something like this is not done with string comparison (probably the worst method ) or branches. If you have a 1000 items, you would not be relying on enumeration either.
One of the more classic ways is to create a Name|Struct map association.
This way you never need to iterate over any elements, you state what you want, and you get it.
Consider having a look at the links. It also may not be a bad idea to grab an inventory tutorial and scrub through it, even if it’s just to get a general workflow.