Well, first of all, its a function:
function typewrite(t$,x,y,x2)
if t$ <> ""
for a=1 to len(t$)
text x+x2*(a-1),y,mid$(t$,a)
wait 500
next a
endif
endfunction
If we call it with these parameters:
typewrite("Test", 20, 20,7)
t$ would be "Test"
x would be 20
y would be 20
x2 would be 7
Then it will check if the text is bigger then 0 chars (if t$ <> "")
If its bigger, it will run into a loop:
for a=1 to len(t$)
Now if we replace len(t$):
for a=1 to 4
text x+x2*(a-1),y,mid$(t$,a)
wait 500
next a
It would run the text and wait command 4 times:
text 20,20,mid$(t$,1)
wait 500
text 27,20,mid$(t$,2)
wait 500
text 34,20,mid$(t$,3)
wait 500
text 41,20,mid$(t$,4)
wait 500
mid$ returns a character from a string:
mid$(string$, number)
So, if our string$ would be "ABCDEFG" and number would be 5
it would return: "E"
Pretty simple.
You can even add a sound effect for each letter
for a=1 to len(t$)
text x+x2*(a-1),y,mid$(t$,a)
play sound TICK NUMBER
wait 500
next a
Hope it helps.