Trigger animation - Something is wrong

Get help using Construct 2

Post » Fri Mar 30, 2012 2:16 am

Hey guys, I'm testing my animations and I'm having some problems after the jumping and falling triggers are activated.

The animations of each runs correctly, and I've also set a trigger to play the "stand/idle" animation when the player touches the floor. But if the "d" or the "a" keys are still pressed (move right and left) the "run" animation won't start unless I release one of them and then press again.

I'm pretty sure that there's a workaround, and that it's probably obvious, but I just can't figure it out :)


here is the capx


thanks a lot guys!!
B
12
S
4
G
2
Posts: 20
Reputation: 2,625

Post » Fri Mar 30, 2012 2:31 am

I think this fixes it...
just a few minor changes.

http://dl.dropbox.com/u/41931267/for%20murilokleine.capx
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Fri Mar 30, 2012 2:55 am

[QUOTE=sqiddster] I think this fixes it...
just a few minor changes.

http://dl.dropbox.com/u/41931267/for%20murilokleine.capx[/QUOTE]



Thanks a lot man! It's perfect! I noticed you changed the "set mirroed" and "set not mirroed" to system events instead of keeping it based on which key is pressed, is there any particular reasons to do this? I really want to learn to make games in C2, so I want to be able to identify the difference between this "minor" changes.

Thanks a lot once again!! :)murilokleine2012-03-30 02:56:04
B
12
S
4
G
2
Posts: 20
Reputation: 2,625

Post » Fri Mar 30, 2012 11:17 am

Hey, no problem.
Those system expressions compare vectorX of the platform behavior. I changed it so that any time the player is moving left, it will point left, and any time the player is moving right, it will point to the right.
I just realized that this was not necessary, I was using the arrow keys by mistake. But it will still benefit you to leave them in as you should support multiple controls, and you will not have to duplicate events.
Also, it is very good to know how vectorX and vectorY work.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Fri Mar 30, 2012 12:46 pm

[QUOTE=sqiddster] Hey, no problem.
Those system expressions compare vectorX of the platform behavior. I changed it so that any time the player is moving left, it will point left, and any time the player is moving right, it will point to the right.
I just realized that this was not necessary, I was using the arrow keys by mistake. But it will still benefit you to leave them in as you should support multiple controls, and you will not have to duplicate events.
Also, it is very good to know how vectorX and vectorY work.[/QUOTE]


That will be usefull for sure!

Thank you for the help
B
12
S
4
G
2
Posts: 20
Reputation: 2,625


Return to How do I....?

Who is online

Users browsing this forum: Kagubro, Solomon, Yahoo [Bot] and 33 guests