Sprite remebering direction when stopped

0 favourites
  • 4 posts
From the Asset Store
Hand-animated Sprite Base for isometric game/animation development
  • Hello there.

    I'm a new user to construct. I've done some tutorials and am now trying to fiddle around with my own platformer. I've googled and tweaked with my problem for a couple of hours now so any help in this matter would be greatly appreciated.

    I use two sets of animations for my playersprite. One set for walking/jumping/falling/standing/dying when facing right and one set for facing left. Everything works fine except for when he's standing. He always uses the animation for facing right when standing. I want him to use the animation for standing and facing left if I have jumped/walked/fallen at that direction.

    I use the event to compare two values to determine which direction my playersprite is heading and then use the appropriate animation. My guess is that when he is not moving the direction is by default to the right.

    This is the way I've used my events and I'm guessing this is where I'm messing something up.

    Does anyone have any idea what I'm doing wrong?

    Kind regards,

    /Almyst

  • I use two sets of animations for my playersprite. One set for walking/jumping/falling/standing/dying when facing right and one set for facing left. [/img]

    Does anyone have any idea what I'm doing wrong?

    instead of using 2 sides for each animation why you dont use the sprite mirror expression? if turned on automatically flips ur sprite to left ... u will have less images and less headaches.

    so u will only need to trigger it once... (ie. A or <- arrow is pressed mirror sprite if D or -> arrow is pressed set not mirrored ) and there is no need to adjust animation speed based on the orientation cause C2 automatically uses the right facing calculation in reverse. Cheers hope it helps u.

  • instead of using 2 sides for each animation why you dont use the sprite mirror expression? if turned on automatically flips ur sprite to left ... u will have less images and less headaches.

    so u will only need to trigger it once... (ie. A or <- arrow is pressed mirror sprite if D or -> arrow is pressed set not mirrored ) and there is no need to adjust animation speed based on the orientation cause C2 automatically uses the right facing calculation in reverse. Cheers hope it helps u.

    My playersprite is holding a sword in his left hand. If I mirror the images he will suddenly hold it in the right. I'm trying to avoid that. And it is also a great challenge in order to learn. I've gone through some tutorials that uses the mirror-fetaure.

    But thanks for the response! I'm planning on using that for enemy-sprites

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • My playersprite is holding a sword in his left hand. If I mirror the images he will suddenly hold it in the right. I'm trying to avoid that. And it is also a great challenge in order to learn. I've gone through some tutorials that uses the mirror-fetaure.

    But thanks for the response! I'm planning on using that for enemy-sprites

    you can also swap the sword by placing its position to a surtain image point on the character sprite and if character is mirrored then mirror the sword also. just a suggestion, probably ur already doing the same event system using the multiple sprites, was just saying will be much easier for u in long development to have it simplified... you will see when u will reach the optimization stage. have fun!

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