I just started working on a new game (a platformer) a while ago. I want my character to blink eyes if the player has stood still for ten seconds. I have an animation for the blink that's based on the idle animation/still.
However, the animation sometimes pops up even when the character is running. Sometimes the animation also happens twice in a row. Any idea how I could fix this? Here's my current code: