How do I do turn animation?

Hi,

I’m a beginner and trying to make my character to move in different ways. I really want to make a turn animation but I can’t make it work. Any help is appreciated.
Thanks!

First of all, you have a condition “is flipped” and then you set flip to Yes, and then condition “not flipped” where you set flip to No. I think you meant the other way around :slight_smile:

Second, you have two different events with “Right key is pressed”. The event sheet executes from top to bottom, so in this setup the bottom “Right key pressed” will always override the first one by changing animation to Run.

Although switching their order would work, it would be much better to use sub-events:

| Right key pressed
|--------------------------------------------
   | Player is on floor            |  change  animation to "Turn"
   ______________________________________________________
   | (inverted) Player is on floor |  change animation to "Run"

I’m not sure why you would want the animation to only play when they are on the floor though? You could just always do the Turn animation when flipping:

right key pressed
    is flipped                    |      change animation to "Turn"
                                  |      flip = no
  --------------------------------------------
    not flipped                   |   change animation to "run"
    animation "Turn" is complete  |

Be careful with Trigger Once… I assume you want the animation to switch back to Run once Turn is complete, the TO will prevent that

Thanks for your help!

I tried your suggestions, but I wasn’t able to make them work. With your first method I got the character to twitch instead of turning, so that was pretty close. :slight_smile:

This was the best I was able to make. But now the turn animation overrides the run animation. I don’t know how to make the turn execute only once.

Hi - I think its because you’re not checking whether its flipped. Look again at magic sofas - second list of events. I don’t think you need is on floor. but It might be better in the long run to have the animation and movement linked to a variable (either a number of text var) - ‘finite state machine’. That’s if you want the character to stop while turning and there are other animation possibilities that might occur like ‘fight’ ‘hurt’ etc
heres a turn ani i did last year
this character isn’t controlled by the player and its not using platform behaviour - so ignore the forces - there’s a number variable that controls the animation


turning ani2