With this function you can find the width of the base resource sprite, with no transforms, in pixels.
sprite_get_width(index);
Argument | Description |
---|---|
index | The index of the sprite to find the width of. |
Real
if sprite_width !=
sprite_get_width(sprite_index)
{
image_xscale = 1;
}
The above code checks the width of the sprite as it is in the current instance and if there is a difference between that and the original base sprite, it resets the x axis scale.