How to set a sprite to an image point

Get help using Construct 2

Post » Thu Nov 08, 2012 4:25 am

Here's how I accomplished this...

I have an animation that travels the distance of about 120 pixels.



I have it so the animation sprite is pinned onto a box sprite. So when the kick animation above is finished, it goes back to the box which is still placed at the beginning of the animation, instead of the last remaning position of the animation.
What needs to happen, for fluidity purposes, is the player box should be positioned to a new image point, located at the end of the animation.

This is done by
[On Animation "Attack" Finish] ==> Set |Player Position| to |AnimationSprite (image point 1)|

This started off as a question, but I answered my question before I could post haha     Here's a dumbed down version of something I'm working on for the sake of an example.

https://www.dropbox.com/s/w6tg92cpfmbvxnr/Fluent%20Animation%20Example.capx bscarl882012-11-08 04:26:26
B
32
S
4
Posts: 405
Reputation: 3,219

Post » Thu Nov 08, 2012 10:49 am

So you placed the player(platform) sprite to the player Image sprite image point at the end of the animation yeah?

Did it work?
When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)
B
29
S
11
G
8
Posts: 313
Reputation: 7,335

Post » Thu Nov 08, 2012 2:39 pm

Yup! I uploaded the capx so anyone can see. This makes it much easier for my artist and I to get the animations working smoothly. He can make a well made animation that spans an area, and I can import it in and make it work without making my character look like he's sliding across the screen.

What I'll have to do is, while the animation is playing, disable the player block and enable the sprites collision boxes instead, only during the animation. Then create collision boxes that are only around the player within the canvas (since the canvas is much bigger than the individual sprite image)   
B
32
S
4
Posts: 405
Reputation: 3,219


Return to How do I....?

Who is online

Users browsing this forum: BipolarMike, Televangelist, totoe and 23 guests