ID:2015638
 
(See the best response by Ter13.)
I'm making a box in which I want the text that any NPC has to say it appears at the window. For example I talk to the NPC it opens the box(interface window) got this so far done. But the question is, Is there a way to put the maptext inside the map of the box?
Or if is possible to do it with a label instead of map, is there a way to update that text?



Best response
Yes on both counts.

Updating a label:
winset([player],"[label_id]","text=\"[text]\";")


Adding maptext to a secondary map:

obj/screen_text
screen_loc = "[map_id]:[x],[y]"
maptext_width = [width]
maptext_height = [height]


Somewhere in your code to add the maptext object:
var/obj/screen_text/o = new()
o.maptext = "[text]"
[player].client.screen += o


You'll want to replace any [] brackets with the values you want.
Thank you very much Ter13 :)