Making Sprite Animation Sequence Align to Arc Path

Get help using Construct 2

Post » Sun Jun 10, 2012 5:43 am

I have a Character sprite. For that character, I have a series of frames depicting a Superleap to GroundBash sequence.

He squats, then leaps, is in mid-air, is about to land, and ends in a squat as he punches the ground. That's 6 different frames that I will duplicate in order to create a 48 frame sequence.

I need to figure out how to do the following three things:

1. When the character is clicked on with the mouse, the sprite changes to the SQUATTING frame.

2. While the mouse button is held down, a partial arc appears from the sprite (a la Angry Birds) that shows the sprite's direction and angle of movement when the mouse is released. The arc will change shape and direction, depending on how the mouse is dragged while the Left-mouse button is held.

3. The sprite frames need to move along the movement arc, aligned so the certain frames are aligned properly.

Here is a diagram of what I mean:



Any suggestions on how any one of these three things can be accomplished would be appreciated! Thank you.DigiLusionist2012-06-10 05:46:15
Check out "Extraordinary!" the Superhero Card Game: www.armchairadventuring.com
B
13
S
2
Posts: 35
Reputation: 1,298

Post » Sun Jun 10, 2012 7:17 am

edit : misread.Canapin2012-06-10 07:20:40
B
5
S
1
Posts: 34
Reputation: 1,026

Post » Sun Jun 10, 2012 7:37 am

Figured out the first step.

Now looking at documentation to see how to create a visible arc path.
Check out "Extraordinary!" the Superhero Card Game: www.armchairadventuring.com
B
13
S
2
Posts: 35
Reputation: 1,298

Post » Sun Jun 10, 2012 1:55 pm

To create a visible arc path just have your player character spawn a small trail sprite every tick as he moves as in the following:

BunnyTrail.capx

I have a fade behavior on the trail sprite, but you don't need that if you want to keep the trail around long enough to try aligning the animation.

As for aligning the animation, there are several events that occur in a platform behavior jump: jump, fall and land. You can play different animations at each of these points. In the example I gave there is a test to see if player is moving. There are similar tests to see if player is jumping, falling or landing.

These are non-looping animations, and there should be some overlap of the different poses. So, for example, the jump animation might include the squat, leap and the height of the leap frames. The fall would include the height of the leap and the fall frames. The land would include fall and land frame.kittiewan2012-06-10 14:04:23
B
29
S
11
G
12
Posts: 281
Reputation: 11,888

Post » Sun Jun 10, 2012 6:01 pm

Here is an example:
http://dl.dropbox.com/u/5426011/examples12/jump.capx

2. Future positions are calculated in a loop in much the same way as the platform behavior actually moves.
3. Basically like kittiewan said.
B
79
S
24
G
54
Posts: 4,747
Reputation: 40,757

Post » Sun Jun 10, 2012 6:03 pm

Thank you so much, guys! I will try these suggestions.
Check out "Extraordinary!" the Superhero Card Game: www.armchairadventuring.com
B
13
S
2
Posts: 35
Reputation: 1,298


Return to How do I....?

Who is online

Users browsing this forum: Mohicano, Yahoo [Bot] and 28 guests