typewriter.. text effect.

Blitz3D Forums/Blitz3D Beginners Area/typewriter.. text effect.

I came up with this example for ya to study :)

Basicly gives the effect your talking to the computer..

Function ComputerType(tex$,x,y,dely)

For e=1 To Len(tex$)

Text x,y,Mid$(tex$,e,1)

Delay dely

x=x+8

Next

End Function

;!@#$!@#%!^!#^#!^!^#$^#@%^#^!
;!@#%$!@%!@#$%!@#$%!@#$%!%!%!
;@#!$%@%!$%!$#%!#%!@#%!@%!#$%

;Program example:

Graphics 800,600,16,2

ComputerType("Hello HAHAH i'm talking to you!!",0,0,100)
ComputerType("HAHAHA i'm still talking to you!!!",0,20,100)
ComputerType("You still cant do anything about it!!",0,40,100)
ComputerType("Still talking................................",0,60,100)
ComputerType("I bet your getting bored about now eh? TO BAD!!",0,80,100)
ComputerType("Lets try a input... type in your name!",0,100,100)
Print
Print
Print
Print
Print
Print
Print
Inpt$=Input()
Computertype("I'm talking to "+Inpt$+" now, How are you doing "+Inpt$+"?",0,140,100)
Print
Print
howare$=Input()
If howare$="bad"
computertype("That sucks. I'll give you 5 seconds till i turn off",0,180,100)
ElseIf howare$="good"
computertype("good for you. i'll give you 5 seconds till i turn off",0,180,100)

Else
computertype("Well thats a dumb answer, Bye bye i don't like you.",0,180,100)
End
End If


Delay 5000


Have fun.