Change Animation

Discussion and feedback on Construct 2

Post » Mon Mar 03, 2014 3:52 pm

Hi guys....
I have build HTML5 game and I have trouble in change animation.
I want to set Jump Animation when KeyUp is pressed or down
and also set jump animation when KeyUp and (KeyLeft or KeyRight) is pressed or down
but, i want to set Run Animation when (KeyUP and (KeyLeft or KeyRight) is pressed or down) and Player Collision with floor or collision with another object.

the problem is cannot change to Run Animation when (KeyUP and (KeyLeft or KeyRight) is pressed or down) and Player Collision with floor or collision with another object. Animation still in Jump Player
please help me, here my code
Image
B
4
S
1
Posts: 34
Reputation: 443

Post » Mon Mar 03, 2014 8:51 pm

I ran into a similar problem a while back. I think what you should try is on the jump animation that doesn't have any other buttons pressed, have it check to make sure that the left and right buttons ARE NOT pressed. So your events will be something like, If UP KEY is Down, and Right KEY is NOT DOWN and LEFT KEY is NOT Down then play animation. Hope that helps.
B
43
S
11
G
8
Posts: 232
Reputation: 7,729


Return to Construct 2 General

Who is online

Users browsing this forum: Kyatric and 13 guests