[SOLVED USING POINTS] Attaching 2 Sprites

Hey Everyone! I have a sprite that I want to attach to my player. The only problem is my player sprite is constantly changing sizes and positions. I’ve tried using "Player.Y()-10) or etc but it still doesn’t work in the way I want it to since the player is changing size! Any help?

Edit: The reason why it doesn’t work is when I change the size of the player, and change the size of the 2nd sprite to match the player size, the sprite offset isn’t the same anymore and bugs out.

Thanks in advance!
– Snowy

Hi @SnowyRawrGamer …have you got platform behaviour on both objects? It’s just that you say bugs out as if the second sprites colission mask is overlapping the platform. You only need it on the original and make the second sprite decorative. I apologise if I’ve misunderstood. If you put a point at the base of the platform object and attach the additional sprite to that but with the origin of the attach sprite at the bottom you can then link the height of the 2nd sprite to the original and it’ll change from the ground up. Need to see a pic really and know how the two go together and if they’re going to be rotated

1 Like

You may want to look at adding a custom point to the sprite. You may need to set the position for every frame which is a tad cumbersome but is part and parcel of being a developer.

1 Like

Yes, this is what I was looking for. Sorry that I can’t show a pic, don’t want to spoil what I am working on :smile:
How do you add a point to a sprite to do that?
Thanks in advance!
– Snowy

Edit: FOUND IT OUT! Super easy solution with points thanks to petlimpet, and now I got it all working smoothly! Thanks so much petlimpet and MrMen for the help! Another GDevelop forum post solved!

2 Likes