Animation problems

  • I'm having problems with the animation in my car game project.

    1. When right-key and up-key are pressed simultaneously, "up animation" is supposed to play, but the frame freezes. Same happens when up-key and down-key are pressed.

    2. second problem is, the default "standing still" animation. It only plays when the game starts. If we drive the car around and stop, the default "standing still" animation freezes.

    (I havn't put in the proper animation for "reverse-up" and "reverse-down" yet. so ignore that)

    Press space to restart game.

    Capx file download link :

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • [attachment=0:2k0bxxjv][/attachment:2k0bxxjv]

    These are three of your events (I've put them close together, but they are still in the order they are in the event sheet)

    if up and right are both down, all of these conditions are true and so all actions will be executed.

    Construct reads from top to bottom

    so first it sets animation up up from the beginning

    then it sets animation forward from beginning

    then it sets up up from the beginning

    it does this every tick, and because different animations are called

    the animation will every tick be restarted from the first frame and as such seem not to run at all

    The trick is to add conditions, so only one of these events is true when both keys are down.

    adding inverted statements does the trick most of the time, although it's not the prettiest method

    In this case you only have to add an up-key is not down condition (right-click invert "up key is down"-condition)to your right key is down event, for both other events have the same action attached.

  • Thanks LittleStain for your help, I tried this, but it's not working..

  • Really appriciate the detailed information But I'm sorry, I can't make it work.

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