[Kinda Solved] How do i make it so my animation works correctly?

I was working on a level for a game I’m making, and then this weird bug came out of nowhere. What’s supposed to happen is when the down arrow key is released, and the animation for this one object is equal to 1, it’s supposed to animation 2, but instead it goes down to animation 3. This is the code and bug happening.

I don’t think “Trigger Once” is necessary as you’re using “key released” - but it might be worth trying.

Another options is nesting the commands. For example:

If Animation = 2

up key (set animation to 1)
down key (set animation to 2)

Another option you could try is adding “AND” to the conditions:

AND
animation=2
up key pressed

etc

1 Like

The trigger once didn’t work, but i’m a bit confused at what i should do with the other options. Do you mean

down key (set animation to 2)

as in down key (set animation to 3), or do you actually mean 2? I feel like if you explain this a bit easier i might get it. I’m really sorry if it’s painfully obvious, i’m pretty new.

They say a picture is worth a thousand words :slight_smile:

In this picture is 2 examples. The first up top is what I mean by nesting.

Below that is the “AND” condition.

I don’t know that either of these will make a difference in the bug you’re experiencing, but I thought it could be worth a try. What I do know is that you won’t be able to fix it or learn anything without trying something different.

1 Like

Oh well, nothing worked :frowning: I guess i gotta scrap the level or make something else out of the sprites.
But thank you anyways! I guess i learned something :smile:

Don’t give up too easy :slight_smile:

I watched the video you posted and it gives me another idea (again, no guarantee this will work)

You could try to set a variable for the animation and control the variable with the keys. Something like this…

This might work, but I already moved on and made a possibly better version of the idea.

( btw those button are there for no reason :P)
You can also watch the progress of the game on itch.io Speedrun & Co. by Polyspring Games, SpringySpringo
Thank you for the support kind stranger! I’ll be sure to credit you!:smile:

1 Like

The new method is a good improvement, I prefer it to the old method you were trying. It adds more refined control.

1 Like

Ah I see, but thank you anyways :slight_smile: , you really helped out