Platform is falling - right or left - animation

Get help using Construct 2

Post » Thu Dec 01, 2011 5:54 pm

Hi

How to set animation when player is falling but he was jump on left ?
Now I had:
Platform is falling - Set animation to "fall"

How to add:
Platform WAS jump on left.

I tried use mirrored and "ping pong" but doesn't work becouse all player animation was mirrored.

thx
B
4
G
2
Posts: 48
Reputation: 1,328

Post » Thu Dec 01, 2011 6:05 pm

Basically what you want is to test what animation was playing prior to the sprite falling.

So, if the jump animation was the default one, play the default fall animation; if the jump animation was mirrored, play the mirrored fall animation.
B
33
S
12
G
7
Posts: 227
Reputation: 7,582

Post » Thu Dec 01, 2011 7:08 pm

Yes ok byt you don't have something like this:
Event:
Animation WAS...
or
Animation is

B
4
G
2
Posts: 48
Reputation: 1,328

Post » Thu Dec 01, 2011 7:21 pm

Ok I added variable = 1 when player walk right
and 0 when walk left
now it's work but I'm not sure it's cool ideal ;-)
B
4
G
2
Posts: 48
Reputation: 1,328

Post » Thu Dec 01, 2011 7:22 pm

You have the condition "Is playing" under the Animation section.
B
33
S
12
G
7
Posts: 227
Reputation: 7,582

Post » Thu Dec 01, 2011 7:45 pm

If I do like this - That's doesn't work.
marcinkowski2011-12-01 19:48:14
B
4
G
2
Posts: 48
Reputation: 1,328

Post » Thu Dec 01, 2011 8:07 pm

That's exactly what I did (plus added the arrow keys are down condition) and it works fine for me.

KFC2011-12-01 20:07:40
B
33
S
12
G
7
Posts: 227
Reputation: 7,582

Post » Thu Dec 01, 2011 9:52 pm

Thanks
It works but I dont understand why it doesn't work without keyboard events ;-)

B
4
G
2
Posts: 48
Reputation: 1,328

Post » Thu Dec 01, 2011 10:04 pm

The keyboard events are here because, most likely, you set on key press set animation to "walk".

Without the keyboard events as sub-events under Platform is falling, pressing the left or right arrow keys in air will result in looping the walk animation.
You need to take in account all the possibilities that can occur during each step of action where you need to change the animation of the sprite.
B
33
S
12
G
7
Posts: 227
Reputation: 7,582

Post » Thu Dec 01, 2011 10:26 pm

YEs I understand keyboard events but I think that aniamation should working without declaration about keyboards.
Becouse if I don't press key: left - animation should fall left becouse we add:
"is animation jumpR playing - set aniamation to jumpR"
But without keyboards events that was not working.

Now I have trouble with jump when player animation stop left or stop right.

marcinkowski2011-12-01 22:27:13
B
4
G
2
Posts: 48
Reputation: 1,328

Next

Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 17 guests