DrawSprite

Category: Images and Rendering

Back to System Functions


Signature

DrawSprite(spriteReference As Integer, frameIndex As Integer, x As Integer, y As Integer)

Returns

Void

Description

Queues one frame from a loaded sprite sheet so the sprite hotspot is drawn at the given position.

New sprites start with a hotspot of 0, 0, which means the position is the frame's top-left corner until you change it with SetSpriteHotspot.

The frameIndex argument is zero-based.

Example

DrawSprite(hero, 0, 100, 200)