Hi everyone. I'm new with Playmaker (and game making in general) but it allowed me to progress more smoothly than expected, but I got stumped in something for some days now. I found some things that could be related, but the language used was above my pay grade. Without further ado, here is my problem.
In my game, you receive two types of "cards", one is shuffled and dealt every turn (let's call it ingredients), and another type is fixed all match (recipes).
The objective is making every recipe with the cards you are dealt with. Let's say, you are dealt a potato card, and one of your options is making a baked potato, requiring the aforementioned potato card. However, you can instead swap another card, hoping to get a beef, unlocking the option of making a steak and fries plate instead, earning more points.
Now for my problem. I want to display in the game screen all the recipes that you need to do, and sort it by "doneness" based on the cards you have in hand, helping the player make a decision.
In the example, a baked potato is 100% done, but another recipe (the steak n fries) has 50% of the requirements meet, a third one is at 33%, and a forth is at 0%.
What I'm doing now is transmitting my ingredients in hand to a Global Variable, reading it with my recipes (each one as a game object), calculating the % of "doneness" and storing it in a INT inside the recipe.
What I'm at a lost is:
-How I read and store the same integer variable of multiple GameObjects into the same Array? Also, I know about Hashtables, but I don't know if I need to do anything with it yet.
-After that, how do I sort everything, keeping every recipe GameObject attached to his respective int (i.e, not shuffling it around).
-And lastly, how I spawn every object in the order of the array? I created some spawn points, but I don't know if it's the way to go.
I hope I could make myself clear, English is not my first language and I'm from another professional background, so I could have fudged some terms. If something is unclear, just ask me for clarification and I will respond ASAP. Thanks in advance for helping me after all the rambling.