draw_self()

From ENIGMA
Revision as of 10:00, 12 December 2013 by RobertBColton (talk | contribs)
Jump to navigation Jump to search

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

Parameter Description
none 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

integer: Returns 0 at all times.

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