my if else condition wrong?

Get help using Construct 2

Post » Mon Nov 23, 2015 4:55 am

I have 2 different colored unicorn, each has 2 direction, left right.
So I have 4 animation:
Red unicorn facing Left
Red unicorn facing Right
Blue unicorn facing Left
Blue unicorn facing Right

I remember my last X position so that i can see which direction the unicorn is moving toward (left or right, ignoring vertical motion).
See attached.

I don't understand why but "R_Left" animation is always playing even when unicorn is moving toward right.
What is wrong with my set up?

Image
B
5
S
1
Posts: 32
Reputation: 439

Post » Mon Nov 23, 2015 6:54 am

As i understand it the 0 x and 0 Y is at top left of the layout so anything Greater then will alway be right direction.

Try fliping the animation direction to see if that helps.
B
51
S
24
G
6
Posts: 391
Reputation: 7,820

Post » Mon Nov 23, 2015 9:42 am

kimtaein1 wrote:I have 2 different colored unicorn, each has 2 direction, left right.
So I have 4 animation:
Red unicorn facing Left
Red unicorn facing Right
Blue unicorn facing Left
Blue unicorn facing Right

I remember my last X position so that i can see which direction the unicorn is moving toward (left or right, ignoring vertical motion).
See attached.

I don't understand why but "R_Left" animation is always playing even when unicorn is moving toward right.
What is wrong with my set up?

Image


I'm not sure which behaviour you are using for the movement of the unicorn and if you are mirroring/rotating the sprite..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, ColombageEnPLS, doriHOG, mrtumbles, rustomatic and 3 guests