Misbug
Member
Hello everyone,
A little prologue: I'm not a coder so please be gentle with my lack of knowledge and poor wording on technical matters.
I have a grid and turn based game that I'm using as a base idea to learn GML and different features of GMS2. In this game all the sprites have their origin point anchored on the top left corner; movement and collisions are basically using that origin point and the grid to make the game happen.
During my studying sessions I decided to explore the possibility of adding code based animations on the player object when it moves by trying to add a squash and stretch animation (picture it as a blob sliding from a tile to another). My problem here is that I can't just image_xscale /yscale at the origin point as the image will stretch toward at an anchor point that doesn't make the movement look natural and changing the origin point will break both collision and grid structure.
Is there any other way to basically scale the sprite attached to that object via code using an origin point different from the one set in the sprite editor? Is just sprite frame by frame animation the only option?
I searched for a solution here on the forum, but I wasn't able to find one; I apologise for the redundant post if this has already been answered somewhere.
A little prologue: I'm not a coder so please be gentle with my lack of knowledge and poor wording on technical matters.
I have a grid and turn based game that I'm using as a base idea to learn GML and different features of GMS2. In this game all the sprites have their origin point anchored on the top left corner; movement and collisions are basically using that origin point and the grid to make the game happen.
During my studying sessions I decided to explore the possibility of adding code based animations on the player object when it moves by trying to add a squash and stretch animation (picture it as a blob sliding from a tile to another). My problem here is that I can't just image_xscale /yscale at the origin point as the image will stretch toward at an anchor point that doesn't make the movement look natural and changing the origin point will break both collision and grid structure.
Is there any other way to basically scale the sprite attached to that object via code using an origin point different from the one set in the sprite editor? Is just sprite frame by frame animation the only option?
I searched for a solution here on the forum, but I wasn't able to find one; I apologise for the redundant post if this has already been answered somewhere.