Changing animation to a sprite changes its position

Just started using Construct 2? Post your questions here

Post » Mon Jun 22, 2015 9:32 pm

Since it seems like a simple matter I thought it should go to the "Beginner's Questions" section.

There's a particular sprite in my game that when I change it's appearance, it changes it's position (for no apparent reason). I tried changing it's appearance either with "change frame" or with "change animation", issue occurs with both.

I can't figure out why it's happening, as when I change the very same object's appearance to something else instead, it doesn't occurs.

The object is a cage. At first it is locked, and when I change its appearance to "unlocked" all is fine, but when I try to change it's appearance to "Destroyed" (a broken cage), instead of only changing its appearance it also changes its position.

All three of them have a resolution of 160 x 160, so it's not because the "destroyed" cage source image is smaller than the others... I'm out of ideas.

CapX: https://www.dropbox.com/s/eh56hhg84rb6qo1/cage_issue.capx?dl=0

Anyone could please help me with this? I reproduced the issue in that CapX, just have to press the buttons to see the issue.
B
10
S
3
G
1
Posts: 25
Reputation: 803

Post » Mon Jun 22, 2015 10:31 pm

The origin of the destroyed box is in the center, while the origin of the other 2 frames/animations are at the top..

You can change this in the image editor..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Jun 22, 2015 10:37 pm

Hahahahaha it's just that? lolll Thanks! Can't believe I didn't notice XD
Thx again! Saved me lots of time.
B
10
S
3
G
1
Posts: 25
Reputation: 803

Post » Sat Mar 04, 2017 11:03 pm

thank you!
B
3
Posts: 4
Reputation: 188

Post » Tue Mar 07, 2017 4:27 pm

Looks like LitteStain found your problem and yes always check your image points in animations or they will jump around like Mexican jumping beans which is not bad if that is the effect you are after lol!

I usually center my first image point and then right click and click apply to all animations or apply to whole animation and that way they all have the same exact image point.

You can also do that with added image points and for collision boxes.
Banned User
B
23
S
6
G
58
Posts: 1,229
Reputation: 34,540


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 3 guests