Platform character turning?

  • I'd like it so that if a character turns in the opposite, a quick "facing you" frame could be shown, to give the effect of a smooth turning animation. I obviously need this brief frame to supersede any other frame that is supposed to play, which is one of the troubles I have had in the past, is having the turning frame show up perfectly every time without the opposite direction animation playing instead, and the turning animation tends to appear randomly depending on which function happens to get there first, so to speak. What would be the best and most reliable way of getting this to work?

  • Zebbi

    You could make the rest of the animations wait until the turning animation is finished.

  • Did Nesteris advice work? Also, do you have the animations done on a Sprite sheet? I'm asking because I thought about some how programming #chracterturns my self by having the animation start some how when the opposite arrow key was pressed instead of the reverse feature.

  • Zebbi

    You could make the rest of the animations wait until the turning animation is finished.

    Which condition/event would be best for doing this? Is there a "animations wait until this is completed" option?

    Did Nesteris advice work? Also, do you have the animations done on a Sprite sheet? I'm asking because I thought about some how programming #chracterturns my self by having the animation start some how when the opposite arrow key was pressed instead of the reverse feature.

    I'd have:

    Player.Platform.VectorX >0 and Left Pressed[/code:2gwfq1wh]
    [code:2gwfq1wh]Player.Platform.VectorX <0 and Right Pressed[/code:2gwfq1wh]
    
    or something to test for a change.
  • Zebbi, you could have a condition on the running events, something like

    Animation "Turning" is Not Playing, that way when you press the key to start turning, the running animation won't interfere with it until it's done.

    And you could put another event "On Animation 'Turning' Finshed" - Action - Play "Running" Animation. That way when the turning animation is finished, the running animation starts up and they shouldn't interfere with each other.

    Just make sure you don't set the turning animation to loop.

  • Zebbi, you could have a condition on the running events, something like

    Animation "Turning" is Not Playing, that way when you press the key to start turning, the running animation won't interfere with it until it's done.

    And you could put another event "On Animation 'Turning' Finshed" - Action - Play "Running" Animation. That way when the turning animation is finished, the running animation starts up and they shouldn't interfere with each other.

    Just make sure you don't set the turning animation to loop.

    Good idea, I'll have to fiddle around and rewrite the existing parts so as it can be the dominant animation. Is there any function in C2 that's similar to !important declaration?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Good idea, I'll have to fiddle around and rewrite the existing parts so as it can be the dominant animation. Is there any function in C2 that's similar to !important declaration?

    Not sure what you mean by the !Important declaration, but you can make sure all the running animations don't play as long as the turning animation is playing by making a

    "Turning Is Not Playing" Condition on all your running animation events.

  • > Good idea, I'll have to fiddle around and rewrite the existing parts so as it can be the dominant animation. Is there any function in C2 that's similar to !important declaration?

    >

    Not sure what you mean by the !Important declaration, but you can make sure all the running animations don't play as long as the turning animation is playing by making a

    "Turning Is Not Playing" Condition on all your running animation events.

    Sorry, in css you can declare !important for a class and it will always take dominance, so if you say had "play animation" and then flagged another event with the equivalent of !important it could always do that instead, even if you had two animation events set-up at the same time.

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