sprite_get_height

Finds the height of a sprite.

Syntax:

sprite_get_height(index);


Argument Description
index The index of the sprite to find the height of.


Returns: Real


Description

With this function you can find the height of the base resource sprite, with no transforms, in pixels.


Example:

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

The above code checks the height 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 y axis scale.


Back: Sprites
Next: sprite_get_xoffset
© Copyright YoYo Games Ltd. 2018 All Rights Reserved