Can't figure this out: simple animation change

Discussion and feedback on Construct 2

Post » Fri Jun 14, 2013 6:17 pm

Hi folks,

I'm having some difficulty understanding a particular occurrence in C2.

I have an object with the platform behaviour, and it changes its animations based on what the character is doing (standing, crouching, sliding, etc.). I've followed the advised practice of using a dummy blocker and placing the animated object on top of it, but I still need the blocker itself to change its shape for a few of the animations in order to change its bounding box.

The issue comes up when my character is standing against a wall. The process of changing animations works perfectly when my character has a wall to its right, but when there's a wall to its left, it sort of "hops" up a little bit.

You can see it happen in this capx. Arrow keys to move. Press C to change states.

I've distilled my project down to its bare essentials and the issue persists, so I assume I'm overlooking something simple. Could anyone offer some help on this?

PS: I'm not looking for a workaround, I've already got one. I'm specifically looking for an explanation or solution, as I'm either doing something fundamentally wrong, or this is a bug.

Thanks!
B
57
S
15
G
11
Posts: 912
Reputation: 12,626

Post » Fri Jun 14, 2013 9:52 pm

It has to do with the origin point creating conflicts. I've already made a few threads about what I thought was an issue with the Anchor behavior, but now I see the culprit is in the origin point not being respected:

http://www.scirra.com/forum/forum_posts.asp?TID=68680&KW=anchor&title=align-to-right-anchor

http://www.scirra.com/forum/forum_posts.asp?TID=69013&KW=anchor&title=right-anchor-ii

http://www.scirra.com/forum/forum_posts.asp?TID=69103&KW=anchor&title=anchor-iii

http://www.scirra.com/forum/forum_posts.asp?TID=69104&KW=anchor&title=anchor-iv

hope you get a better answer...
B
18
S
5
G
4
Posts: 568
Reputation: 5,084

Post » Fri Jun 14, 2013 9:52 pm

It looks kind of buggy, but there a workaround can solve your problem

B
99
S
35
G
29
Posts: 3,139
Reputation: 28,421

Post » Fri Jun 14, 2013 9:58 pm

@California

wow, you made 4 threads as you know not commit your mistake, you should know about the programming is NOT a magic, it's a logic. You should research and find alternate methods.
B
99
S
35
G
29
Posts: 3,139
Reputation: 28,421

Post » Fri Jun 14, 2013 10:12 pm

@California, I'm not sure that these are related. Or if they are, I don't see how.

@Joannesalfa, thanks, but as I said, I'm not looking for a workaround - I already have one. I'm looking for an explanation or a solution.
B
57
S
15
G
11
Posts: 912
Reputation: 12,626

Post » Fri Jun 14, 2013 10:15 pm

You should report a bug.
B
99
S
35
G
29
Posts: 3,139
Reputation: 28,421

Post » Fri Jun 14, 2013 10:21 pm

Yes, I will do so if I don't get anywhere here. But bug reports tend to be ignored by the general population, from which I'd like some feedback if anyone has any ideas.
B
57
S
15
G
11
Posts: 912
Reputation: 12,626

Post » Fri Jun 14, 2013 10:29 pm

"General population"? No.... Ashley will explain you if is a bug or not.

I advice you should use workaround to fix it, sometimes bad codes can make good games. If you really want simple, don't bother to use different collisions for this sprite.
B
99
S
35
G
29
Posts: 3,139
Reputation: 28,421

Post » Fri Jun 14, 2013 10:38 pm

You're missing my point, but thanks anyway.
B
57
S
15
G
11
Posts: 912
Reputation: 12,626

Post » Fri Jun 14, 2013 10:39 pm

[QUOTE=GeometriX] @California, I'm not sure that these are related. Or if they are, I don't see how.

@Joannesalfa, thanks, but as I said, I'm not looking for a workaround - I already have one. I'm looking for an explanation or a solution.[/QUOTE] In the examples I posted, the origin point is set to Top-Right, but when I scale it, it scales from Top-Left, obviously if the origin point is set to the Top-Right, the object should grow from there.
In your example, the origin point is set to origin point: Bottom-Center, but when crouching the object crouches from Center-Center.

B
18
S
5
G
4
Posts: 568
Reputation: 5,084

Next

Return to Construct 2 General

Who is online

Users browsing this forum: Yahoo [Bot] and 13 guests