Thanks Zombie 20 and Kevin Picone for your help. Much appreciated. Modified to suit my needs.
** EDIT **
Here are the functions:
From the information supplied by Zombie 20 and Kevin Picone,
function substring1(across,down,message$,pos,length)
x=x+1
substring$=left$(right$(message$,len(message$)-(pos-1)),length)
tw(x)=text width(substring$)
if pos=1
across_a=across
else
across_a=across_a+tw(x-1)
endif
text across_a,down,substring$
endfunction
and based on TDK_Man's tutorials on how to get a sub-string from a string
function substring2(across,down,message$,pos,length)
y=y+1
substring$=""
for n=pos to length
substring$=substring$+mid$(message$,n)
next n
tw(y)=text width(substring$)
if pos=1
across_a=across
else
across_a=across_a+tw(y-1)
endif
text across_a,down,substring$
endfunction
And here they are, applied in a short programme.
hide mouse
dim tw(20)
wait 500
set text font "arial"
set text size 21
set text to bold
th=text height("arial")
ink rgb(255,217,128),1
rem ====================== Message =====================
message$="The Game Creators"
tw=text width(message$)
across=320-tw/2:down=190
rem ---------------- Calling Function 1 ----------------
pos=1:length=4
substring1(across,down,message$,pos,length)
wait 500
pos=5:length=5
substring1(across,down,message$,pos,length)
wait 500
pos=10:length=8
substring1(across,down,message$,pos,length)
wait 500
inc down,(th*1)
rem ---------------- Calling Function 2 ----------------
pos=1:length=4
substring2(across,down,message$,pos,length)
wait 500
pos=5:length=9
substring2(across,down,message$,pos,length)
wait 500
pos=10:length=17
substring2(across,down,message$,pos,length)
wait 500
inc down,(th*2)
rem ==================== New message ===================
message$="The Home of Dark Basic"
tw=text width(message$)
across=320-tw/2
rem ---------------- Calling Function 1 ----------------
pos=1:length=4
substring1(across,down,message$,pos,length)
wait 500
pos=5:length=5
substring1(across,down,message$,pos,length)
wait 500
pos=10:length=3
substring1(across,down,message$,pos,length)
wait 500
pos=13:length=5
substring1(across,down,message$,pos,length)
wait 500
pos=18:length=5
substring1(across,down,message$,pos,length)
wait 500
inc down,(th*1)
rem ---------------- Calling Function 2 ----------------
pos=1:length=4
substring2(across,down,message$,pos,length)
wait 500
pos=5:length=9
substring2(across,down,message$,pos,length)
wait 500
pos=10:length=12
substring2(across,down,message$,pos,length)
wait 500
pos=13:length=17
substring2(across,down,message$,pos,length)
wait 500
pos=18:length=22
substring2(across,down,message$,pos,length)
wait 500
wait key
end
` ---------------------------------------------------
` Function 1 to get part message to write to screen
` ---------------------------------------------------
function substring1(across,down,message$,pos,length)
x=x+1
substring$=left$(right$(message$,len(message$)-(pos-1)),length)
tw(x)=text width(substring$)
if pos=1
across_a=across
else
across_a=across_a+tw(x-1)
endif
text across_a,down,substring$
endfunction
` ---------------------------------------------------
` Function 2 to get part message to write to screen
` ---------------------------------------------------
function substring2(across,down,message$,pos,length)
y=y+1
substring$=""
for n=pos to length
substring$=substring$+mid$(message$,n)
next n
tw(y)=text width(substring$)
if pos=1
across_a=across
else
across_a=across_a+tw(y-1)
endif
text across_a,down,substring$
endfunction
I realise the subject may have been covered before, but someone may have a different way of doing it and their view would be appreciated.
The Wizard
The simplest way to learn speed reading is to get an unexpected letter from the taxation office