[SOLVED] Switching animations when touched or mouse click

Ok I am having an issue. I’m trying to make it so when I touch a box on my scene. The game will check what animation is active on the box. Selected or Idle. Whatever is active it will switch to the opposite. However I cannot get this to work. This is the event sheet so far

Hi @bdm634,

Events in GDev are read top to bottom, so in your example you are setting it to selected, then its being switched straight back to idle.

You could achieve what you want todo in a few ways, below is an example with an boolean.

1 Like

Thats what i needed… Thanks dude

1 Like