Animations change for Inventory System

How do I…

Hey all, I’m new to this engine and want to test out how to do fundamental game-functions such as inventory systems. Currently the program will account for different items going into different slots, but it only shows the quantity amount and doesn’t change the actual animation. For example, when I add item_sword to the empty inv slot, it will just say “1” in the quantity, instead of saying “1” for quantity and also changing the animation to “Sword” for name. Quantity and name are the two instance variables used.

Currently I’m using .VariableString(name) to change the animation, so it would change to whatever the instance “name” represents. But it doesn’t work. Can anybody help me out with this command? Or a new solution?

What do you mean? you mean the animation wont change depending on what item it is?

In the second action of this event:

Inventory_Icon does not have a variable name. It should be nameofitem