How do I sync Animation Frames

Get help using Construct 2

Post » Sat Mar 12, 2016 6:07 pm

Hi there
I`m new in construct 2. And i think i have a simple question.
I`m making a platform-shooter an now i have a Problem with the Synchronisation of two animations.
I have two Sprites for the Body an the Legs of my Character. The legs and the Body have the same number of Frames. now when im shoot the Body plays shooting Animation an have to return to walk Animation. but when i said after Animation shoot go back to walk Animation the Body and the legs are not sync.
How can i do a simple thing like:
set.body.animationFrame=legs.animationFrame ?
anytime when i try it i have a Syntax Error. how do i have rite the line correctly?

"excuse my bad English"
B
9
S
1
Posts: 22
Reputation: 473

Post » Sat Mar 12, 2016 9:40 pm

Make a copy of the Walking Body anim. Replace the first frames with the frames in the Shooting Anim. Now you have a new Shooting Anim with same amount of frames ? Then just always change body and legs anim togheter ?
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Sun Mar 13, 2016 7:01 am

@99Instances2Go
The shooting Animation is shorter than the walk Animation. The Problem is that i dont know when you press the fire button. For example wehn you press fire at the half of the walk Animation, than the Fire Animation starts linke you says and go on with the walk Frame ist not sync with the legs. When i Change the Body and legs anim together it Looks wierd because the legs jumps back to beginning of Animation.

It should work like this:

When you move:
Body -> Play Walk Animation
Legs -> Play Walk Animation

When you move and shoot
Body -> Play shoot Animation
When shoot Animation finish -> go back to Body Walk Animation

Now i want when i go back to the Body Walk Animation that the Animation not start at the first Frame (beqause it Looks wierd). It have to start at the Frame Number of the Frame that the legs have at this time.

Or do i think wrong?
Last edited by Jomnitech on Sun Mar 13, 2016 1:14 pm, edited 1 time in total.
B
9
S
1
Posts: 22
Reputation: 473

Post » Sun Mar 13, 2016 7:24 am

Study some sprite sheet I learn about proper animation by looking at shantae half genie sprite sheet. Basically what we are saying is that find some common ground for the animation frame to end that would start another. ill use color for example in this frame we are going to use three frame. White blue and red and then the next animation is on white.

....wait now its jittering so basically do this White blue red blue white. Thus what ever is forward must complete a animation back to the starting point of color.

Like i said try studying some sprite sheet and look at the common frame and you will see that some of them are repeated for start and end.

Oh and id like to add this most sprite are not separated for body n legs try to keep them in one animation.
B
52
S
24
G
6
Posts: 391
Reputation: 7,845

Post » Sun Mar 13, 2016 12:09 pm

This way ?
https://
drive.google.com/open?id=0B1SSuCVV8v74UXV1eEpzMzlXNnM

The body-walk anim has a speed of zero, that is the importand part. It plays by just showing the same frame as the legs-anim, unless the shooting-anim is playing. The shooting-anim is triggerd by mouse and its end triggers the walk back in.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Sun Mar 13, 2016 1:12 pm

@99Instances2Go
exacly this way. that is what im lookin for. So easy :D
thanks a lot !
B
9
S
1
Posts: 22
Reputation: 473


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 35 guests