Animations issue

For questions about using Classic.

Post » Mon Sep 20, 2010 3:50 pm

Hi,
The video below (nearly at the end of the video):
http://www.youtube.com/watch?v=s3LXlr6zdKA
shows how the animation 'Fall' alternates with the animation "Idle' instantly without having any key pressed.
The player is a simple object with a platform behavior and the crate a simple solid object. I have not implemented events concerning the player control and his animations.
I don't know how to avoid this. Any idea?
B
2
G
2
Posts: 31
Reputation: 712

Post » Mon Sep 20, 2010 3:55 pm

[quote="pap560":am3uzpbr]Hi,
The video below (nearly at the end of the video):
http://www.youtube.com/watch?v=s3LXlr6zdKA
shows how the animation 'Fall' alternates with the animation "Idle' instantly without having any key pressed.
The player is a simple object with a platform behavior and the crate a simple solid object. I have not implemented events concerning the player control and his animations.
I don't know how to avoid this. Any idea?[/quote:am3uzpbr]

I'm having this issue as well whenever my sprite (MegamanX) stops wallsliding or jumping at an intersection with two platforms or boxes the same thing happens, it alternates between jumping and standing sprites for some stupid reason. I guess it's because I'm using collision by pixel instead of bounding box or whatever... so that might be what's causing it with yours.

Not sure though, only been using the program for about a day and a half now, lol. Good luck.

[edit]

Actually, just went in and did some tinkering, and pixel and bounding box do the same thing. It wasn't till I set Megaman's Collision to by "point" that the problem stopped. Try that, you might have to alter where your points are, but it should work. :)
B
1
G
2
Posts: 9
Reputation: 643

Post » Mon Sep 20, 2010 4:01 pm

Are you using a "collision box" for your player, or does your player sprite handle the collisions? Looks to me like your player sprite handles collisions itself, per pixel, which would have it's arm cling on to the platform when it's falling off of it - creating the problem you're having.
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Mon Sep 20, 2010 4:03 pm

Ah well, Tokinsom said it already but since I typed all this...

[quote="pap560":2f8ji777]Hi,
The video below (nearly at the end of the video):
http://www.youtube.com/watch?v=s3LXlr6zdKA
shows how the animation 'Fall' alternates with the animation "Idle' instantly without having any key pressed.
The player is a simple object with a platform behavior and the crate a simple solid object. I have not implemented events concerning the player control and his animations.
I don't know how to avoid this. Any idea?[/quote:2f8ji777]

Always use a dummy sprite handling the actual collisions (or the collision mask feature). My guess is that you're handling the collision directly with your player sprite, which changes in size from frame to frame. Therefore the collision box changes each frame too. And since there's a significant change in the size of the Falling and Stopped animations, it results in the jerkyness you've shown in the video when standing near an edge.
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Mon Sep 20, 2010 5:49 pm

[quote="Tokinsom":1bf0jnj0]Are you using a "collision box" for your player, or does your player sprite handle the collisions? Looks to me like your player sprite handles collisions itself, per pixel, which would have it's arm cling on to the platform when it's falling off of it - creating the problem you're having.[/quote:1bf0jnj0]

I use the "per pixel" method. Finally I found what was the problem:
I did use of a collision mask only for the first frame of the Idle animation. I pasted the same collision mask to all frames and for all animations. Now everything works fine.

BTW: the method described in the video below is not working for me (0.99.91)
http://www.youtube.com/watch?v=y9vs494u4Ik
After the "Copy Collision mask to each frame" operation, the collision mask of the HitBox is deleted and nothing happens to the other frames. I had to paste the collision mask manually to all frames
B
2
G
2
Posts: 31
Reputation: 712


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests