draw_sprite_stretched(sprite,subimg,x,y,w,h)

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

 

sprite = The name of the sprite you want to draw. This is the name you gave it when you created the sprite resource.

subimg = This is the frame of the animation you want to draw.

x = This is the horizontal position of the sprite, in pixels.

y = This is the vertical position of the sprite, in pixels.

w = Width of the sprite in pixels.

h = Height of the sprite in pixels.

 

Example

draw_sprite_stretched(spr_ghost,-1,100,100,300,100);

 

This is a more advanced sprite drawing function, one which can draw a selected sprite at a selected scale. The sprite will be stretched w and h pixels in the required direction. In the above example, the sprite's origin is placed at 100 pixels from the left of the screen, 100 pixels from the top of the screen and will be stretched 300 pixels on the horizontal plane and 100 pixels on the vertical plane.  A ' -1 ' in the subimg means run the animation as normal.

 

 

 

Flashback - Revision #1