How to mirror only some animations, but not all

Get help using Construct 2

Post » Fri Oct 28, 2011 1:50 am

How to mirror only some animations, but not all of them in the same character?

For example, I have a character, where he will jump and double jump. The double jump will use 3 frames, one to begin, one to rotate 360 and one to release the pose.

The 360 will use the same frame, so, I want to use the scripts to make this frame rotate 360, without the need to draw it doing the animation.

So, if I put the auto-mirror ON, it always change his facing, how do you workaround it?
ImageImageImageImageImageImage
B
93
S
20
G
12
Posts: 1,212
Reputation: 18,482

Post » Fri Oct 28, 2011 2:24 am

In the events where you say "On right pressed - set Player angle to 0" and "On left pressed etc etc", add a condition that says "Player - Animation doublejump is NOT playing". That way, you'll still face the same direction during that animation.
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

Post » Fri Oct 28, 2011 5:14 pm

Thanks @SullyTheStrange, I'll try it out today =]

-----

Tried it out, but where is this option? I did Player - animation is playing > stop animation;

Do you can paste the code here?
ImageImageImageImageImageImage
B
93
S
20
G
12
Posts: 1,212
Reputation: 18,482

Post » Fri Oct 28, 2011 5:27 pm

When you right click a condition, you can "Invert" it.
So test "Animation 'Name' is playing" and invert it.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Fri Oct 28, 2011 5:51 pm

I did a sample

http://igmbrasil.com/forum/Uploads/sandbox/

This is working nice now, but I have another problem, hahahah. Well, no worry, it need more time thinking on it and how to make a smart system.

@Kyatric
How the "Invert" condition work? If I make a condition to change the animation and make it invert, the animation will begin from the end or will flip/mirror the sprites?
ImageImageImageImageImageImage
B
93
S
20
G
12
Posts: 1,212
Reputation: 18,482

Post » Fri Oct 28, 2011 8:21 pm

Condition "Animation 'Name' is playing" inverted means "the condition will be true when the animation "Name" is NOT playing".
Any condition can be inverted and results in its "opposite"/negation.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Fri Oct 28, 2011 10:13 pm

[QUOTE=Kyatric] Condition "Animation 'Name' is playing" inverted means "the condition will be true when the animation "Name" is NOT playing".
Any condition can be inverted and results in its "opposite"/negation.[/QUOTE]

Nice, it's very nice, very very nice.

Thanks.
ImageImageImageImageImageImage
B
93
S
20
G
12
Posts: 1,212
Reputation: 18,482


Return to How do I....?

Who is online

Users browsing this forum: Vallar, Yahoo [Bot] and 18 guests