draw_sprite_ext(spr,subimg,x,y,xscale,yscale,rot,col,al)

Note: This function must be placed in the Draw Event for it to work correctly.

 

spr = The name of the sprite you want to draw, whether the name of the resource file or a temporary one created by loading a resource, or keywords such as sprite_index.

subimg = The frame of the sprite you want to draw.  -1 means it's animated.  Use image_index for the current subimage.

x = The x position in the room you want the sprite drawn.

y = The y position in the room you want the sprite drawn.

xscale = How wide you want the sprite to be drawn.  The number used as the argument is how much the scale will be multiplied.  Use -1 for a horizontally mirrored sprite.

yscale = How tall you want the sprite to be drawn.  The number used as the argument is how much the scale will be multiplied.  Use -1 for a vertically mirrored sprite.

rot = The angle of the sprite.  0 is no rotation.  You may also use variables such as direction.  Smoother than using multiple subimages for direction.

col = The color the sprite is blended with.  Use a color constant or a variable.  For no blending use c_white.

al = The alpha transparency of the sprite.  Use a value from 0-1, 0 being fully transparent, 1 being fully opaque.

 

Example

draw_sprite_ext(spr_player,-1,100,100,1,1,direction,c_white,0.5);

 

Use this function to replace draw_sprite.  This expands the functionality by adding arguments such as xscale, yscale, rotation, color, and alpha.  You can use this to draw the sprite on the screen.

 

Exploding Diamond Products - Revision #1