Click select item and change item's animation

Hi, this happens because changes the animation every frame you hold down the mouse button.
You need to tell the game to only change the animation once when you click it.

To solve it,try something like this - I used global variable:

the justPressed variable makes sure the animation is only changed once.
This is quite messy though

1 Like