prevent myself from walking backwards

0 favourites
  • 8 posts
  • Hello all,

    i have came across a problem while playing around with construct.

    i have noticed that if i were to press down right to move right

    but then press left while right is still pressed. the character stops

    as he should but looks left.

    if i were to let the left go while still holding right i begin to run

    however i am now facing left with the animation backwards as i run to the right.

    is there anyway to mend this? because its rather goofy.

  • You could add another, inverted condition to the event so that it doesn't move if both keys are pressed:

    +Left Arrow Down

    +Right Arrow Not Down

    • > Move left

    Invert conditions by pressing I on the keyboard or right-clicking.

  • hmm its not working for me i know im not doing something right

    on [Right Arrow Down]

                |-[Left Arrow not Down] = -> Move right


    or is it more

    [Right Arrow Down]


    [Left Arrow not Down] = -> Move right


    how does that look?

  • Hmm, what kind of behaviour are you using? Seems to me the platform behavior sorts this out automatically. Maybe you could upload your file to dropbox and post a link here so I can have a look?

  • im using the keyboard platform and mirror behaviors,

    sorry i should have said in the previous post that it did work to some degree except now if i were to press left as soon as i let left go and proceed to press right the animation will continue from the running left animation.

    ill upload the file in a sec!

    Thanks for the help and your patience btw!

  • Happy to help. A setup similar to this should do the trick for you I believe:

    PlatformMirror.capx (r134)

  • cool ill check it out, in the mean time here is the capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I cracked it!!!

    man what a rush! Thanks for all the help dude.

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