client/proc/DRAW_TEXT(var/text_string,var/slowText,var/obj/HUD/h)
var/tmp/pixel_x_plus
var/char_pos = 1
var/char_len = length(text_string)
while(char_pos < char_len+1)
var/charInc = 0.2
charCheck
var/T = copytext(text_string,char_pos,char_pos+1)
if (T != " ")
var/image/I = image('HUD/HUD - Font.dmi', h, "[T]", 22) // 'h' is just a location. Could be any location really.
I.transform = I.transform.Scale(0.8,0.8)
I.pixel_x += pixel_x_plus
I.pixel_y = pixel_y_offset
I.mouse_opacity = 1
I.menu_id = m_id
I.name = h.name
src << I
pixel_x_plus += font_width
char_pos++
if (slowText) // Show the text letter-by-letter on screen
while (charInc < world.tick_lag)
charInc += 0.2
goto charCheck
if (!src.skipText)
sleep(world.tick_lag)
Problem description:
Hello! I have a proc that is supposed to display text via images on a clients screen. It works great most of the time, but there are certain situations in which the images stop appearing entirely.
The most consistent way I've found of replicating this is by talking to an NPC in-game (This causes the HUD to appear and the text string to print itself out as multiple images), and while the text is on screen, you leave the game.
Upon reconnecting to the server, and trying to talk to the NPC again, you can't see any of the text anymore. The world and logic are both working fine, the game doesn't freeze up or anything, everything is working as it should, except I can't see the text. I thought it might've been a Byond Version issue but my Byond is up-to-date, so I feel like I'm stuck...
Thanks in advance for your help!