Replying to:Arkzen
I've used code similar to that and now i use it for most of my games. Its a nice touch for dialogue text.
Wow really? that's cool! I agree with you on that one! :-)
Root / Submissions / [.]
DEF AUTOTEXT X,Y,TXT$ FOR I=0 TO LEN(TXT$)-1 GPUTCHR X+I*6,Y,TXT$[I],1,1 VSYNC 3 'Speed of the text NEXT ENDAuto Text Function with speed option
DEF AUTOTEXT X,Y,TXT$,SPEED FOR I=0 TO LEN(TXT$)-1 GPUTCHR X+I*6,Y,TXT$[I],1,1 VSYNC SPEED NEXT ENDI don't know if this would be useful for anyone but I figured I would show it anyway in case someone needed something like this. :-)
DEF Dialogue_Text Text$,POS,TIME OUT NewTIME, NEWPOS IF !TIME THEN 'if time has passed and it's 0, show a character ? Text$[POS] IF LEN(Text$)-1 (bigger than) POS THEN NEWPOS=LEN(Text$)POS+1 NewTIME=15 ELSE NewTIME=TIME-1 ENDIF END
DEF Dialogue_Text Text$,POS,TIME OUT NewTIME, NEWPOS IF !TIME THEN 'if time has passed and it's 0, show a character ? Text$[POS] IF LEN(Text$)-1 (bigger than) POS THEN NEWPOS=LEN(Text$)POS+1 NewTIME=15 ELSE NewTIME=TIME-1 ENDIF END