With this function you can find the width of the base resource sprite, with no transforms, in pixels.
|index||The index of the sprite to find the width of.|
if sprite_width !=
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.