Simulate Typing
Blitz3D Forums/Blitz3D Programming/Simulate Typing
| ||
Is there different and easier way to do this? Text 0,0,"A" Delay 100 Text 10,0,"r Delay 100 Text 20,0,"e" Delay 100 Text 40,0,"Y" Delay 100 Text 50,0,"o" Delay 100 Text 60,0,"u" Delay 100 Text 80,0,"S" Delay 100 Text 90,0,"u" Delay 100 Text 100,0,"r" Delay 100 Text 110,0,"e" Delay 100 Text 120,0,"?" Delay 100 Text 60,20,"Y" Delay 100 Text 70,20,"/" Delay 100 Text 80,20,"N" |
| ||
There are better methods but quickly ..PrintText("Are You Sure?" , 0 , 0 ) PrintText("Y/N", 60,20 ) Function PrintText( t$ , x , y ) For l = 1 To Len( t$ ) Char$ = Mid$( t$, l, 1 ) Text x + (l-1) * 10 , y , Char$ Delay 100 Next End Function |
| ||
Or, similar to Stevie's method, use a data statement, keep track of what characters your on and display (after clearing the screen every frame of course) use mid(stringname$, 0, current character). |
| ||
Perfect, thanks alot! |
| ||
I use a random delay, makes it look more realistic so use: delay rand(80,120) instead. |
| ||
May I get a better description of the funtion "Mid"? |
| ||
Let's say you have a string "GIZMO" and you want to print only IZM characters, you write this code.name$="GIZMO" Print Mid$(name$,2,3) ;String, Which character to start, how many characters |
| ||
Cool. Thanks, Mortiis :) |