How do I change direction of character is facing with animation. Animation Problem as well.

0 favourites
  • 7 posts
From the Asset Store
Rotate & Animation for 16 Direction & Mouse Direction
  • Hi there,

    So i am learning how to incorporate animations in construct 3, and downloaded some free sprites and animations to use.

    I am trying to get my character to turn left and right with animation run, i have idle animation as well as else statement so when your not touching left and right on touch screen buttons idle animation runs.

    Problem is when i set mirrored and i press the right button, player faces left instead and runs left but cant turn right again. Also it shouldn't turn left when i press the right button. I tried to also set run for both left and right as you can see but that does not work either, I tried with angles as well but that just rotates the player and moves it about.

    Additionally the third screenshot, my character sprite is all pixely in the game and on the layout. It should not look like this and i cant seem to fix this issue. Its not like this when i click on the sprite and go into animations it looks fine.

    Finally the 4 and 5th screenshot shows explosions animation which works, but the last frame of the explosion just stays on screen and stays stuck. i tried many things but cant fix this issue.

    Thank you for assistance.

  • I prefer not implement else condition for actions that you would use and with other conditions.

    Because you check if touching "left touch" set animation to run (else) set animation to idle.

    So at the third event you check if you touch "right touch" set animation to run , but you have already set the animation to idle because you did not touch "left touch".

    Instead of else try use "is touching left" and "is touching right" and invert both.

    For mirrored you have to set the mirrored back like you do with is touching right set mirrored , make and for left touch and set not mirrored.

    For the explotion just destroy it on any animation finished.

    And for your character , what is the dimension of your sprite?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you for the reply Savvito.

    I did explosions on a separate event on animation finished and destroyed it, worked. Now i understand destroying animations better and how to do it.

    Regarding sprite dimension do you mean the size? Because when i press (size: make 1.1) my sprite just went huge and took over screen but looked like how it should. The size was 567x556 when its huge. But i want the sprite to be 64x64 like above, but its pixely. How do i fix this? Or do i have to fix the sprite?

    Finally the sprite movement and animation see screenshots below, I am still a bit confused. Below is what i did and i still cant get the sprite to face the other way with mirrored. Also another problem i realised was when i touch the left and right buttons, the animation runs for a few seconds then stops and goes to idle animation. And I have never used inverted before and cant seem to find that action. When you say is touching left and is touching right do you mean in separate events or sub event? Could you give example?

    Thank you for your help.

  • Please give me 15 minutes to reach my pc and send to you an example.

    Meanwhile you can answer why you use 8 direction instead of platform behavior?

    I mean you want your player can jump sometime?

  • Here is a quick example.

    Note there are more ways to animate a character, i think this is the simplest.

    dropbox.com/s/b66lybq7jqj2qzs/animation.c3p

  • Thank you so much savitto. That helped me understand how to do player animation with movement properly and invert as well. I dont want to use jump for this one, its more of a moving shooter type of game looking up.

  • i do not recomment using mirror because i had the same situation as you and it didnt work.so i used two different animations already mirrored in editor.

    edit:now i know how to use mirror.

    1.set not mirrored for the direction of the current animation of the sprite.

    2.but set mirrored for the other direction.

    eg. if the sprite is facing right for the current animation,then set not mirrored in events when he moves right. and mirror for left movement.

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