How do I set the animation depending the first key pressed

Just started using Construct 2? Post your questions here

Post » Mon Feb 01, 2016 8:03 pm

Hello, my problem is that I want different animations when pressing something like up+right, but I want animation A to happen while holding the UP arrow first and then press RIGHT. And the animation B to happen while holding the RIGHT arrow first and press UP.
If somebody help me I would appreciate it.
I managed to start the animation cycle but it wont continue looping:
Image

Thanks for reading.
B
4
Posts: 10
Reputation: 220

Post » Mon Feb 01, 2016 8:15 pm

Try using sub-event.
Right arrow is down > sub-event - On Up arrow pressed - set animation ...
B
6
S
1
Posts: 29
Reputation: 465

Post » Mon Feb 01, 2016 8:19 pm

Image
B
14
S
3
G
1
Posts: 87
Reputation: 997

Post » Mon Feb 01, 2016 8:57 pm

I tried this, but still nothing:
1)
Image
2)
Image

Help please :oops:
B
4
Posts: 10
Reputation: 220

Post » Mon Feb 01, 2016 9:20 pm

let the animation only in the sub -event
Image
B
6
S
1
Posts: 29
Reputation: 465

Post » Mon Feb 01, 2016 9:34 pm

I tried that but the animation cycles wont even start.

Image

And if I change the sub event to press instead of down, it will do just 1 full cycle but wont loop.
B
4
Posts: 10
Reputation: 220

Post » Tue Feb 02, 2016 12:55 am

OK I manage to do it, I dont know if it would cause problems later on but I in all the walking animation properties I set them to loop and add this:
Image

Can anyone explain me how those events make the animation A to happen while holding the UP arrow first and then press RIGHT. And the animation B to happen while holding the RIGHT arrow first and press UP??

Thanks
B
4
Posts: 10
Reputation: 220

Post » Tue Feb 02, 2016 8:25 am

Message: seymore can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Image
Download example:
http://www.mediafire.com/download/udyd08t7vg8b2gj/example.capx
B
6
S
1
Posts: 29
Reputation: 465

Post » Wed Feb 03, 2016 12:15 am

Thanks Seymore that worked
B
4
Posts: 10
Reputation: 220


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest