Draw_self - hpgDesigns/hpgdesigns-dev.io GitHub Wiki

NOTOC {{-}} This function is part of the function set Drawing sprites

Notation

Description

Draws the instance's current sprite as it would have appeared if you didn't have a draw event. It uses the values of the object's sprite-related variables. This is a convenience function which is equivalent to calling

draw_sprite_ext(sprite_index,image_index,x,y,image_xscale,image_yscale,image_angle,image_blend,image_alpha)

Parameters

This function has no parameters. Instead, it determines how to draw the sprite according to the current values of the instance's sprite-related variables.

Return Values

Always returns int 0.

Example Call

//Draws the current sprite and a rectangle around it.
draw_self();
draw_rectangle(x-sprite_xoffset,y-sprite_yoffset,x-sprite_xoffset+sprite_width,y-sprite_yoffset+sprite_height,true);

See also