How do I make my inventory show the image I want?

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 :]

You need to tell GDevelop which ingredientes you mean:

So this needs to be a sub-event of the one above, or you need to add conditions to identify the ingredientes.

Thanks for the reply.
@Gruk I did try it. I even tried putting as a sub event of the first one that destroys the boxes and still doesn’t work as I wanted. That’s why I posted here because maybe (probably) I’m missing something.

I changed the code and tried the first version when I click the ingredients and the slot change but this time isn’t working anymore.