How do I make a 'Turn Around' animation for a platformer.

0 favourites
  • 9 posts
From the Asset Store
A well commented RPG game template to learn from or use as a base for your own game!
  • I'm VERY new to construct. I have my platformer going with a walking animation. I'm using Mirrored to walk in both directions.

    But I'd like to have a 'turn around' animation play when the character changes direction.

    I've tried several things but nothing works consistently. Is there something I'm missing? Any easy way to make the character have a turn around animation?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Here's a link to the game file.

    dropbox.com/s/1wn3i1l24axw3tg/Test.c3p

    Like I mentioned, I'm VERY new to this, so I'm probably missing a million things.

    I can get the turn around animation to play when he turns left but not right. And it also sticks on the last frame of the animation until I let go of the key.

  • An easy way to do this is for instance you have 3 animations left right and turnaround

    If left animation is playing

    And keyboard key press right

    Play animation turnaround

    If right animation is playing

    And keyboard key press left

    Play animation turnaround

    Dont allow the player to turn though until the animation has finished as it might look glitchy from turning so you can do this by adding

    Is animation turnaround playing

    Then right click that and select invert now a red x should appear meaning its checking that turnaround isnt playing meaning the player cant turnaround until the character is dont turning the first time.

  • thenadamgoes

    very similar to what Tyler said...

    https://www.rieperts.com/games/forum/cattest2.c3p

  • Thank you both so much. That was incredibly helpful! It seemed so easy, but I clearly have a lot to learn!

  • If you guys don't mind. I have one question about the c3p file posted. In there is an instance variable that is a boolean called "isTurning".

    I don't really understand how this works, I'm actually really unclear on how instance variable work and I was hoping you could help me understand.

  • Variable: A value that can be changed depending on the situation.

    Boolean variable: A variable that has two states, true or false.

    Instance variable: A variable that is attached/associated with a specific instance of an object.

  • I understand what the actual words mean. But I guess what I don't understand is how the game knows what "isTurning" means, or what to do with it.

    The event sheet is setting it to true and false, but I don't know what info is associated with it. If that makes any sense.

  • The last condition in event 21 in the example

    + cat2: [X] Is isTurning

    This is an inverted condition to check if isTurning is False

    If isTurning is true, this event won't run

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)