Below is a little function I wrote to display messages like you might see in a 2d RPG.
img$ is the path to an image you want to display with the message (IE a character face).
text$ is the text to be displayed. This function also separates your string into seperate lines of text up to 5 lines.
Hope you find this useful! Any questions just ask.
function ShowText(img$,text$)
`dim the screen behind the box(optional)
get image 200,0,0,screen width(),screen height()
sprite 200,screen width(),screen height(),200
set sprite diffuse 200,100,100,100
load image img$,201
dim textline(5) as string
boxy = 50
boxwidth = 600
boxheight = 150
charnum = 0
for t = 1 to 5
textline(t) = ""
next t
if text width(text$) > boxwidth - 250
for t = 1 to 5
if text$ = "" then exit
while text width(textline(t)) < boxwidth - 250
if text$ = "" then exit
word$ = ""
repeat
word$ = word$ + left$(text$,1)
text$ = right$(text$,len(text$)-1)
until right$(word$,1) = " "
textline(t) = textline(t) + word$
endwhile
next t
ELSE
textline(1) = text$
endif
do
cls
if returnkey() = 0 then rtrn = 0
paste sprite 200,0,0,
ink rgb(255,255,255),0
box (screen width()/2)-(boxwidth/2),boxy,screen width()/2+(boxwidth/2),boxy+boxheight
ink rgb(0,0,0),0
box (screen width()/2)-(boxwidth/2)+2,boxy+2,screen width()/2+((boxwidth/2)-2),boxy+boxheight-2
ink RGB(255,255,255),0
paste image 201,screen width()/2-(boxwidth/2)+25,boxy+25
text (screen width()/2-(boxwidth/2)+25)+125,boxy+25,textline(1)
text (screen width()/2-(boxwidth/2)+25)+125,boxy+45,textline(2)
text (screen width()/2-(boxwidth/2)+25)+125,boxy+65,textline(3)
text (screen width()/2-(boxwidth/2)+25)+125,boxy+85,textline(4)
text (screen width()/2-(boxwidth/2)+25)+125,boxy+105,textline(5)
if returnkey() = 1 and rtrn = 0 then inc story : rtrn = 1 : exit
sync
loop
delete image 200
delete sprite 200
undim textline()
endfunction