Looked around for some Maptext libraries and found FlysBad's , it worked pretty nicely so I decided to use some of the knowledge I gained to give it a try for my own maptext.
Haven't even tested if this works or not, I am asking here for some feedback on this, and if it indeed is flawed I would want you to point out it's flaws so I can improve myself. Thanks o;
Code:
MapText
parent_type = /obj
var FONT = "Arial"
var SIZE = 2
var ALIGN = "CENTER, CENTER"
var COLOR = "White"
var LAYER = FLY_LAYER
var WIDTH = 200
var HEIGHT = 32
var TEXT
proc/MapText()
src.maptext_width = WIDTH
src.maptext_height = HEIGHT
src.SIZE = SIZE
src.FONT = "[FONT]"
src.TEXT = "[TEXT]"
src.ALIGN = "[ALIGN]"
src.COLOR = "[COLOR]"
src.layer = "[LAYER]"
src.maptext = "<font face=[FONT]size=[SIZE]color=[COLOR]>[TEXT]</font>"
You may also want to put arguments into the MapText() proc, because right now all you're doing is setting your vars all over again. If you use named arguments in the proc, you can dynamically change the text.