prevent myself from walking backwards

Get help using Construct 2

Post » Thu Jun 20, 2013 12:16 pm

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.
B
5
S
1
Posts: 88
Reputation: 653

Post » Thu Jun 20, 2013 1:16 pm

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.
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Thu Jun 20, 2013 2:24 pm

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

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

or is it more

[Right Arrow Down]
and
[Left Arrow not Down] = -> Move right
                                        ETC

how does that look?AngelRave2013-06-20 14:25:22
B
5
S
1
Posts: 88
Reputation: 653

Post » Thu Jun 20, 2013 2:36 pm

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?
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Thu Jun 20, 2013 2:55 pm

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!
B
5
S
1
Posts: 88
Reputation: 653

Post » Thu Jun 20, 2013 3:16 pm

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

PlatformMirror.capx (r134)
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Thu Jun 20, 2013 5:19 pm

cool ill check it out, in the mean time here is the capx
https://www.dropbox.com/s/q6izwx9n33apcd1/for%20construct%20forums.capx
B
5
S
1
Posts: 88
Reputation: 653

Post » Fri Jun 21, 2013 9:07 am

I cracked it!!!

man what a rush! Thanks for all the help dude.
B
5
S
1
Posts: 88
Reputation: 653


Return to How do I....?

Who is online

Users browsing this forum: justintime0185, oddreal, TRMG, twomonocles, wmsgva and 8 guests