Animation woes...

Get help using Construct 2

Post » Wed Feb 08, 2012 7:25 am

I'm completely redoing the animation system in my game, Sneaky Ninja, but I seem to have hit a snag. The ninja's usually holding something, and his hand is a separate object set to one of his image points, which works perfectly fine as you'd expect it to. When I tried implementing the turn-around animation, though, it flips out for a single tick. It's really quick, but it's extremely noticeable, and I've spent the last three hours trying to find a way to get rid of it with no luck.

The ninja himself also flips out for a single tick, only when turning to the left. Again, extremely noticeable, and seemingly impossible to fix.

I made a super basic version with only 8 events to show the problem. Press any key to make him turn, and well, see for yourself.

http://db.tt/TukM7llC

EDIT: Oh, and the way I have things set up may seem a bit strange at first, but trust me when I say it's (mostly) necessary. It's a bit of an odd animation system, but it's part of a bigger scheme... SullyTheStrange2012-02-08 07:27:07
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

Post » Wed Feb 08, 2012 7:52 am

I'm seeing it too, but as you say "seemingly impossible to fix".
Maybe @Ashley could tell you more about this.

I don't know why, but it kinda feels connected to this bug report to me.
Just an intuition.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Post » Wed Feb 08, 2012 9:33 am

That's not really a bug, that's because triggers works a bit like standalone events so you're never sure when they happen compared to normal events.
ninjaTurn.capx
Last edited by Yann on Sun Sep 14, 2014 9:39 pm, edited 1 time in total.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Wed Feb 08, 2012 10:08 am

Good job @Yann.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Post » Wed Feb 08, 2012 6:25 pm

Thanks @Yann! That works fine, but... the way it was set up before, the turn animation ping-pongs and mirrors so that it looks as smooth as possible. This way only plays half, so he starts turning to the left, then halfway through teleports to the end of it, if you know what I mean.

Maybe it's only the kind of thing I'd notice, but if at all possible I want to have the full thing play. I tried altering yours to include that, but the imagepoints are acting up again... Mind taking another look?

http://dl.dropbox.com/u/19702035/ninjaTurn.capx

(The timescale is set to 0.1 so you can really see what's happening. If it's set to 1 and you make him turn repeatedly, you can see it doesn't happen every time, just most of the time. I don't know if that's important or not.)
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

Post » Wed Feb 08, 2012 7:27 pm

Here's a fix:

ninjaTurn Fix

The problem is caused when you flip frame 3 instead of the frame after frame 3 during the turn. So it gets flipped one frame before it should.

I fixed by flipping frame 3 in the image editor to keep the events simple the way they are, so when you flip it in events it will be in the correct orientation.

This solution is kind of hacky though. It would be better if there was a way to check if the ping-pong animation is forward or backward.
Scirra Employee
B
129
S
45
G
15
Posts: 705
Reputation: 15,413

Post » Wed Feb 08, 2012 7:48 pm

Perfect! Thanks a lot guys. Who knows how many more hours of blankly staring at the screen it would've taken for me to notice that?
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

Post » Wed Feb 08, 2012 7:57 pm

That's how I would do it
ninjaTurn2.capx
Your way is too convoluted I think.
Last edited by Yann on Sun Sep 14, 2014 9:42 pm, edited 2 times in total.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Wed Feb 08, 2012 8:04 pm

It certainly is convoluted, but like I said in the first post, there's a reason for it. It's hard to explain... trust me on this one.

It's not like it's THAT much more complicated anyway. No big deal!
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

Post » Wed Feb 08, 2012 8:40 pm

Well I don't think there that much difference between this last capx and yours, you should explain a bit, so I know what to change and what to keep (:
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Next

Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 20 guests