This is the function working properly:
typewriter(10,125,"I didn't need an array.",10)
typewriter(10,140,"Just a function that would call text, duh.",10)
typewriter(10,155,"Pretty sweet huh?.",10)
function typewriter(x#,y#,text$,speed)
for a=1 to len(text$)
text x#,Y#,left$(text$,a)
wait speed
next a
wait 500
endfunction
And now it doesn't work:
create animated sprite 1,"DoctorSprite.bmp",8,2,1
typewriter(10,125,"I didn't need an array.",10)
typewriter(10,140,"Just a function that would call text, duh.",10)
typewriter(10,155,"Pretty sweet huh?.",10)
function typewriter(x#,y#,text$,speed)
for a=1 to len(text$)
text x#,Y#,left$(text$,a)
wait speed
next a
wait 500
endfunction
The sprite works fine within the program, I have singled out this line of code as the problem, can anyone tell me why Create Animated Sprite is messing this function up?