createSprite()
Purpose
Create a new sprite.
Description
Create a new sprite
Syntax
handle = createSprite( )
Arguments
Example
image = loadImage( "Untied Games/Explosion 01", false )
explosion = createSprite()
setSpriteImage( explosion, image )
setSpriteAnimation( explosion, 0, 69, 60 )
setSpriteLocation( explosion, { gWidth() / 2, gHeight() / 2 } )
setSpriteScale( explosion, { 5, 5 } )
tiles = getSpriteAnimFrameCount( explosion )
for i = 0 to tiles loop
clear()
setSpriteAnimFrame( explosion, i )
drawSprites()
update()
repeat
Associated Commands
createSprite(), deltaTime(), drawSprite(), drawSprites(), removeSprite(), updateSprites(), updateSprite()