sprite_height

Returns the height of the currently assigned sprite.

Syntax:

sprite_height


Returns: Real


Description

This read only variable returns the height of the sprite that has been assigned to the instance. This height is returned in pixels and will be dependant on the image_yscale. If you need the un-scaled height you should use sprite_get_height.


Example:

if sprite_height != sprite_get_height(sprite_index)
   {
   image_yscale = 1;
   }

The above code checks the height of the sprite assigned to the instance running the code against the height of the sprite resource and if it is not the same, it resets the image_yscale to 1,


Back: Instance Properties
Next: sprite_width
© Copyright YoYo Games Ltd. 2018 All Rights Reserved