GM: draw sprite

From GMpedia.org Wiki

Jump to: navigation, search
The correct title of this article is draw_sprite(sprite,subimage,x,y). It appears incorrectly here because of technical restrictions.

draw_sprite()

Type: function
Arguments: 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.

Limitations: must be in Draw Event or used with Surfaces.

This function draws a sprite of a given id and a certain image index on the position x,y.

This article was originally found at the Game Maker Knowledge Base, contributed by Flashback.
See the talk page for details
Personal tools