ID:262547
 
Code:
client/Center()
if(mob.screen==START)
mob.screen=ADVANCE_TO_END
if(mob.screen==END)
mob.removetextbox()
mob.removeletters()
mob.screen=null

var/width=1
var/list/colors=list("#FFFFFF"='text.dmi')
hud
parent_type=/obj
textbox
layer=BOX_LAYER
icon='textbox.dmi'
letter
layer=TEXT_LAYER
icon='text.dmi'
mob
var
screen
textdelay=1
verb
test()
displaytextbox()
spawn()displaytext("This is a test, yes, I know, it's a stupid test. But, still, it's a test. Testasdasdasadsad test asdasd")
addwidth()
width+=3
world<<width
removetextbox()
removeletters()
proc
textonscreen(t)
displaytextbox()
displaytext(t)
width(t)
if(!istext(t))return
var/dmifont/font/f=new
return f.metrics[(text2ascii(t)*3)-88]
displaytextbox()
for(var/i in icon_states('textbox.dmi'))
var/t=copytext(i,1,findtext(i,","));t=text2num(t);t++;var/s=copytext(i,findtext(i,",")+1,length(i)+1);s=text2num(s);s++;
var/hud/textbox/o=new
o.screen_loc="[t],[s]"
o.icon_state=i
client.screen+=o
removetextbox()
for(var/hud/textbox/t in client.screen)client.screen-=t
removeletters()
for(var/hud/letter/l in client.screen)client.screen-=l
displaytext(t,color="#FFFFFF")
if(!istext(t))return
var/icon/k=icon('text.dmi')
if(colors[color])
k.icon=colors[color]
else
k.SwapColor(rgb(255,255,255),color)
colors[color]=k
var/list/l[0]
var/list/g[1]
for(var/i=1 to length(t))
var/q=copytext(t,i,i+1)
l+=q
if(q==" "){g.len++;continue}
g[g.len]+=q
g[g[g.len]]+=width(q)+1
var
px=8
py=-4
sx=1
sy=3
gc=1
safe
screen=START
for(var/i in l)
if((g[g[gc]]+px+sx*32)>BOX_WIDTH&&safe!=g[g[gc]])
px=8
py-=12
sx=1
while(py<=-32)
py+=32
sy--
else
safe=g[g[gc]]
var/hud/letter/o=new
o.icon=k
o.icon_state=i
o.screen_loc="[sx]:[px],[sy]:[py]"
px+=width(i)+1
while(px>=32)
px-=32
sx++
if(i==" ")gc++
client.screen+=o
if(screen!=ADVANCE_TO_END)sleep(textdelay)
screen=END


Problem description:

The lines aren't skipping when the word is too big...of course, I could always just use Mom's DMIfonts.
Are you doing what I'm doing? because that code you posted makes my head spin to read it :P
In response to Cowdude (#1)
Watcha' mean? =p I'm making an on screen text system simlar to that of Dragon Warrior's, that's about it. =p