Before I tried making something on my own I looked the inventory example, tried and succeeded a similar version (clicking in a object and make it appear in a slot).
In my version I want to: spawn some items > add them to the inventory system > play an animation (tween) > then verify if there are some free slots and change the animation to the item.
But I tried a lot of things and I can’t understand the flow for the conditions. I tried putting the slot condition as a sub event in all of them to see the different results and in some of them all the slots get the same animation frame and only one update the text. I don’t know what to try anymore.
Some information:
- Each slot have a specific ingredient name and number. For example, the first slot (far left) is suppose to show only the tomato sprite (animation #1). But at this point If I can show the sprites in any slot I’ll be happy as well.
- I was trying to match the ingredient slot variable or slot number with the ingredient name or number so it updates the right slot. Now I’m just comparing if the slot It’s empty (the variable starts with the value as “true” so It should be).
This was before
Now (ignore the string, It’s just testing If the ingredients are being added correctly in the inventory)
Can someone help me understand what It’s wrong?
Thanks in advance :]