Help with spriter animation in C2

Get help using Construct 2

Post » Fri Sep 06, 2013 10:45 pm

So I thought I might try spriter for one of my games..

Spent quite some time making those cut animations, then animating it... and now on import I have problems :( (one reimporting issue I mentioned in another topic)

Apart from that,

I have 2 animations "walk" and "attack"

I see that neither "set animation" works nor pausing nor anything works. :(

It keeps playing "walk" by default.

Anyone knows how to take control of what animation to play in spriter?


Thanks.
Krish
Hey! Did you know that you can hire me to make your games?

Click Here to See More
B
21
S
6
G
5
Posts: 391
Reputation: 5,662

Post » Fri Sep 06, 2013 10:51 pm

Edited the properties of that object and specifying "starting animation"

Doesnt work :(

@lucid please help.
Krish
Hey! Did you know that you can hire me to make your games?

Click Here to See More
B
21
S
6
G
5
Posts: 391
Reputation: 5,662

Post » Sat Sep 07, 2013 10:25 pm

The way to get this to work is use set entity and that allows you to specify animation again.. this is just a work around.


More problems in spriter world now...

I am checking for collision and want the object to stop moving... and there is no action called stop moving (there is move forward and move at an angle)

Even using move at an angle of 0 with distance 0 doesnt work.

Having a solid behavior also seems to not work.. this sprite chap is happily walking off over my other solids :)
Krish
Hey! Did you know that you can hire me to make your games?

Click Here to See More
B
21
S
6
G
5
Posts: 391
Reputation: 5,662

Post » Sat Sep 07, 2013 11:58 pm

Are you pinning the spriter object to a solid object and using the object for control?
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,583

Post » Tue Sep 10, 2013 8:29 am

@bluephaze

no, I added solid behavior to the spriter object.. and also tried adding solid to the object family.

Is there a "tried-out" correct way of doing this?
Krish
Hey! Did you know that you can hire me to make your games?

Click Here to See More
B
21
S
6
G
5
Posts: 391
Reputation: 5,662

Post » Tue Sep 10, 2013 3:08 pm

The best way is just like you would without spriter, pin the spriter object to a rectangle. Making the spriter pieces solid will not help as your animations will be very jerky with so many collision points hitting the ground, etc... in your animations. So pin the spriter object to a rectangle and assign the rectangle the platform behavior. Then make it invisible. Basically you control the rectangle and the spriter object is just the visual representation that displays the correct animations at any one time.

This is especially helpful if you are going to be doing more advanced platform behaviors like wall slides, etc... as you have much better control of your collision polygon surface and shape.
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,583

Post » Wed Sep 11, 2013 4:26 am

I shall try :) thanks.

Btw, do you have a workaround for getting those animations to work on cocoonjs ... or does any other compilation service give me apks and bars in which the animations will work?

Krish
Hey! Did you know that you can hire me to make your games?

Click Here to See More
B
21
S
6
G
5
Posts: 391
Reputation: 5,662


Return to How do I....?

Who is online

Users browsing this forum: ChoosyZerk, lordsas and 76 guests