DGNNY
Member
Henlo
on my draw GUI event, I draw an icon for an ability and draw text over it to represent the cooldown
i want the position of the text to be relative to the position of the icon, but i don't know how to get the x position of it.
returns 0 because it only gives the position of the origin according to the sprite.
does anyone know how i can get the position of the icon sprite?
this is the code i am using
on my draw GUI event, I draw an icon for an ability and draw text over it to represent the cooldown
i want the position of the text to be relative to the position of the icon, but i don't know how to get the x position of it.
GML:
sprite_get_xoffset
does anyone know how i can get the position of the icon sprite?
GML:
draw_sprite(shotgunicon,0,607,1);
shotgunxpos = sprite_get_xoffset(shotgunicon)
if (shotgunCD > 0)
{
draw_text(shotgunxpos,1,round(shotgunCD / 60));
}
Last edited: