December 03, 2020, 08:09:29 PM

Author Topic: [bb] TypeRiter Text! by n8r2k [ 1+ years ago ]  (Read 587 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
[bb] TypeRiter Text! by n8r2k [ 1+ years ago ]
« on: June 29, 2017, 12:28:43 AM »
Title : TypeRiter Text!
Author : n8r2k
Posted : 1+ years ago

Description : Basically it takes a string, chews it up, assigns variables then does the typewriter effect.

To use, wait for the program to type the string, then press a key.

I am going to post this on <a href="http://n8r2k.deviousbytes.com/" target="_blank">http://n8r2k.deviousbytes.com/[/url] soon, maybe


Code :
Code: BlitzBasic
  1. Graphics 800,600,16,2
  2. SeedRnd MilliSecs()
  3.  
  4. Global fxText$ = "TypeRiter Text Demo By n8r2k " ;Always add one extra space at the end just in case
  5. Global fxlength = Len(fxText$)
  6.  
  7. Dim fx$(fxlength)
  8. Dim fxx(fxlength)
  9. Dim fxy(fxlength)
  10. Dim f(fxlength)
  11. d = 100
  12. t = 100
  13. For  v = 1 To fxlength
  14.         fxx(v) = d
  15.         f(v) = t
  16.         fxy(v) = 100
  17.         fx$(v) = Left(fxText$,1)
  18.         fxText$ = Right(fxText$,(Len(fxText$)-1))
  19.         d = d + 10
  20.         t = t + 10
  21. Next
  22. x = 0
  23. For n = 1 To fxlength
  24.         Text f(n),100,fx$(n)
  25.         Delay(50)
  26.         Flip
  27. Next
  28. WaitKey()


Comments :


Ked(Posted 1+ years ago)

 SetBuffer function needs to be in this for it to look smooth.


Ked(Posted 1+ years ago)

 Wouldn't it be easier if it was this...
Code: [Select]
Function Rite(a$)
num=Len(a$)
For i=1 To num
Write Mid$(a$,i,1)
Delay 100
Next
Print
End Function

Rite "OH NO!!! I HURT MY FACE!!!!"
Rite "YOU STUPID IDIOT!! YOU HURT MY FACE!!!"

WaitKey()
End


 

SimplePortal 2.3.6 © 2008-2014, SimplePortal