Platform character turning?

Get help using Construct 2

Post » Sun Feb 15, 2015 10:41 pm

I'd like it so that if a character turns in the opposite, a quick "facing you" frame could be shown, to give the effect of a smooth turning animation. I obviously need this brief frame to supersede any other frame that is supposed to play, which is one of the troubles I have had in the past, is having the turning frame show up perfectly every time without the opposite direction animation playing instead, and the turning animation tends to appear randomly depending on which function happens to get there first, so to speak. What would be the best and most reliable way of getting this to work?
B
41
S
12
G
14
Posts: 1,117
Reputation: 11,248

Post » Mon Feb 16, 2015 1:28 am

@Zebbi

You could make the rest of the animations wait until the turning animation is finished.
The moderators are corrupt and ban for no reason, especially that condescending neckbeard asshole Kyatric. The forums are filled with fanboys.
Banned User
B
22
S
7
G
1
Posts: 558
Reputation: 2,925

Post » Mon Feb 16, 2015 2:55 am

Did Nesteris advice work? Also, do you have the animations done on a Sprite sheet? I'm asking because I thought about some how programming #chracterturns my self by having the animation start some how when the opposite arrow key was pressed instead of the reverse feature.
B
15
S
5
G
2
Posts: 164
Reputation: 3,082

Post » Mon Feb 16, 2015 6:28 am

Nesteris wrote:@Zebbi

You could make the rest of the animations wait until the turning animation is finished.


Which condition/event would be best for doing this? Is there a "animations wait until this is completed" option?

BurningWood wrote:Did Nesteris advice work? Also, do you have the animations done on a Sprite sheet? I'm asking because I thought about some how programming #chracterturns my self by having the animation start some how when the opposite arrow key was pressed instead of the reverse feature.


I'd have:
Code: Select all
Player.Platform.VectorX >0 and Left Pressed

Code: Select all
Player.Platform.VectorX <0 and Right Pressed


or something to test for a change.
B
41
S
12
G
14
Posts: 1,117
Reputation: 11,248

Post » Mon Feb 16, 2015 12:43 pm

@Zebbi, you could have a condition on the running events, something like
Animation "Turning" is Not Playing, that way when you press the key to start turning, the running animation won't interfere with it until it's done.

And you could put another event "On Animation 'Turning' Finshed" - Action - Play "Running" Animation. That way when the turning animation is finished, the running animation starts up and they shouldn't interfere with each other.
Just make sure you don't set the turning animation to loop.
The moderators are corrupt and ban for no reason, especially that condescending neckbeard asshole Kyatric. The forums are filled with fanboys.
Banned User
B
22
S
7
G
1
Posts: 558
Reputation: 2,925

Post » Mon Feb 16, 2015 2:25 pm

Nesteris wrote:@Zebbi, you could have a condition on the running events, something like
Animation "Turning" is Not Playing, that way when you press the key to start turning, the running animation won't interfere with it until it's done.

And you could put another event "On Animation 'Turning' Finshed" - Action - Play "Running" Animation. That way when the turning animation is finished, the running animation starts up and they shouldn't interfere with each other.
Just make sure you don't set the turning animation to loop.


Good idea, I'll have to fiddle around and rewrite the existing parts so as it can be the dominant animation. Is there any function in C2 that's similar to !important declaration?
B
41
S
12
G
14
Posts: 1,117
Reputation: 11,248

Post » Mon Feb 16, 2015 2:34 pm

Zebbi wrote:Good idea, I'll have to fiddle around and rewrite the existing parts so as it can be the dominant animation. Is there any function in C2 that's similar to !important declaration?


Not sure what you mean by the !Important declaration, but you can make sure all the running animations don't play as long as the turning animation is playing by making a
"Turning Is Not Playing" Condition on all your running animation events.
The moderators are corrupt and ban for no reason, especially that condescending neckbeard asshole Kyatric. The forums are filled with fanboys.
Banned User
B
22
S
7
G
1
Posts: 558
Reputation: 2,925

Post » Mon Feb 16, 2015 2:49 pm

Nesteris wrote:
Zebbi wrote:Good idea, I'll have to fiddle around and rewrite the existing parts so as it can be the dominant animation. Is there any function in C2 that's similar to !important declaration?


Not sure what you mean by the !Important declaration, but you can make sure all the running animations don't play as long as the turning animation is playing by making a
"Turning Is Not Playing" Condition on all your running animation events.


Sorry, in css you can declare !important for a class and it will always take dominance, so if you say had "play animation" and then flagged another event with the equivalent of !important it could always do that instead, even if you had two animation events set-up at the same time.
B
41
S
12
G
14
Posts: 1,117
Reputation: 11,248


Return to How do I....?

Who is online

Users browsing this forum: Ajbael, jmiller4180 and 14 guests