setSpriteText()
Purpose
Create a text sprite
Description
Create a sprite containing text in the specified font size and colour
Syntax
setSpriteText( sprite, fontsize, tint, arguments )
Arguments
sprite handle of the sprite
fontsize fontsize of the text
tine colour of the text
arguments comma separated list of text arguments
Example
image = loadImage( "Untied Games/Enemy A", false )
sprite = []
for i = 0 to 4 loop
sprite[i] = createSprite()
setSpriteText( sprite[i], 50, red, "Sprite ", i )
setSpriteLocation( sprite[i], gWidth() / 2, gHeight() / 2 )
repeat
loop
clear()
printAt( 0, 0, "Press buttons X, A, Y and B to draw sprites")
updateSprites( )
c = controls(0)
if c.x then
drawSprite( sprite[0] )
endif
if c.a then
drawSprite( sprite[1] )
endif
if c.b then
drawSprite( sprite[2] )
endif
if c.y then
drawSprite( sprite[3] )
endif
update()
repeat
Associated Commands