Smooth attack animation then resume animation.

Get help using Construct 2

Post » Sun Mar 04, 2012 3:15 pm

Hello.

I've pretty much just started using Construct and everything so far has worked out pretty good. However I ran in to a problem the other day which I can't figure out how to solve.

This is what I have:
Walking animation with 4 frames.
Jumping animation with 1 frame.
Falling animation with 1 frame.

Also I have a shooting animation with 6 different frames.

I would like to be able to blend in to the shooting animation and then resume the walking animation.



How would I go about to blend in tot he correct shooting frame and then back to the walking?Vitae2012-03-04 15:16:14
B
4
Posts: 46
Reputation: 617

Post » Sun Mar 04, 2012 3:59 pm

So you have a shooting animation (where he is walking) and then just a regular animation too...

Ok so, I suppose you could do this:

local variable: frame_preserve
on shoot --> set frame_preserve to player.animationframe
        --> set animation to "shooting"
        --> set animation frame to frame_preserve

local variable: frame_preserve2
on stop shooting --> set frame_preserve2 to player.animationframe
                 --> set animation to "walking"
                 --> set animation frame to frame_preserve2
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Sun Mar 04, 2012 5:29 pm

I must be daft. Can't seem to find how to make a local variable. I know the global variables and have used them quite a lot.
B
4
Posts: 46
Reputation: 617

Post » Sun Mar 04, 2012 5:41 pm

[QUOTE=Vitae] I must be daft. Can't seem to find how to make a local variable. I know the global variables and have used them quite a lot.[/QUOTE]

You need a subevent to add a Local variable
English is not my native language. Sorry for any mistakes and feel free to correct me if needed.
B
14
S
5
G
3
Posts: 110
Reputation: 3,225

Post » Sun Mar 04, 2012 5:46 pm

ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Sun Mar 04, 2012 6:54 pm

Not sure if I've set this up correctly. The player goes in to the shooting animation but slides around as if always playing frame 1 of the shooting animation.

B
4
Posts: 46
Reputation: 617


Return to How do I....?

Who is online

Users browsing this forum: anty21ro, DamonZero, Google [Bot], Radulepy and 1 guest