On-screen text

by Kidpaddle45
Want text slowly typed on the player's screen? This is what you need. (Uses 2 examples: maptext and output) [More]
To download this demo for your Linux/Mac installation, enter this on your command line:

DreamDownload byond://Kidpaddle45.Onscreen##version=1

Emulator users, in the BYOND pager go to File | Open Location and enter this URL:

byond://Kidpaddle45.Onscreen##version=1

366 downloads
Version 1
Date added: Aug 17 2014
Last updated: Aug 18 2014
10 fans
V.1.0
Send a message to a player with text slowly being typed on-screen. (Like in Pokemon games)
Hold Z to make the text type faster.

Do you like my creations? Donate, it motivates me! =D










Comments

Nowatimean: (May 3 2015, 11:49 am)
Any idea how to delete the text (as well as box text is within) after a certain period of time or due to a verb such as Continue()?
Also, I'd be curious to see how to make the text appear top to bottom and make the following lines occur under the previous.
Babblu3: (Apr 22 2015, 10:01 pm)
Off here with the [url=http://www.e-six-sigma.net]http://e-six-sigma.net/[/url] basics, we have the object itself, audiohandler. This object should always be defined under the object tree for another object, such as a mob or client. To initialize the audio handler, pass the mob into the new() proc as such:
Flame Guardian: (Mar 8 2015, 5:35 am)
I'm not longer experiencing run time errors with this code.
proc/Text(mob/M,var/Text="")
var/Blank = " "
for(var/HUD/Text/Te in M.client.screen)
if(M)
Te.maptext = ""
del(Te)

var/HUD/Text/T = new
if(M)
M.client.screen.Add(T)

T.maptext_width = length(Text) / length(Text)*300//300
T.maptext_height = length(Text) / length(Text)*100
while(length(Blank)-2<length(Text)+1)
if(M)//.client)
sleep(M.TxtSpd)
if(M)//.client)
Blank = addtext(Blank,"[getCharacter(Text,length(Blank))]")
T.maptext = "<font face=\"Power Red and Blue\"><U><font color = #FDD017><font size=4>[Blank]" // The name of the font is not its file's name.
spawn(30)
if(M)//.client)
M.client.screen.Remove(T)
else
return
else
return
else
return
Flame Guardian: (Mar 6 2015, 8:49 am)
I've been experiencing runtime errors upon having a mob logout() during the creation or deletion of screen text.

This is the code I implemented to reduce the runtime errors from infinite to 4-5 and therefor preventing dream daemon from crashing. Still, the abundance of if(M.client) and return's are clients are unnecessary.

proc/Text(mob/M,var/Text="")
var/Blank = " "
for(var/HUD/Text/Te in M.client.screen)
Te.maptext = ""
del(Te)

var/HUD/Text/T = new;M.client.screen.Add(T)

T.maptext_width = length(Text) / length(Text)*300//300
T.maptext_height = length(Text) / length(Text)*100
while(length(Blank)-2<length(Text)+1)
if(M.client)
sleep(M.TxtSpd)
if(M.client)
Blank = addtext(Blank,"[getCharacter(Text,length(Blank))]")
T.maptext = "<font face=\"Power Red and Blue\"><U><font color = #FDD017><font size=4>[Blank]" // The name of the font is not its file's name.
spawn(30)
if(M.client)
M.client.screen.Remove(T)
else
return
else
return
else
return