ID:1826081
 
(See the best response by LordAndrew.)
Code:
mob
var
obj/HUD/HealthHUD
obj
HUD
maptext_height=32
maptext_width=32
layer = FLY_LAYER
mob
proc
HealthHUD()
if(!HealthHUD)
HealthHUD = new()
HealthHUD.maptext = "<font color = white align=center><font size = 20>[src.Health]"
HealthHUD.screen_loc = "1x,1y"
src.client.screen += HealthHUD


Problem description: What i am trying to do is, make text on the screen appear showing the number of the user's health. I have the proc on the Login, and i made a verb for it. But, it just doesn't appear, am i missing something?

You need to set maptext_width/height to a value that would actually show the full value. Otherwise, it's not going to show up. size 20 is absolutely huge.
In response to Ter13
Ter13 wrote:
You need to set maptext_width/height to a value that would actually show the full value. Otherwise, it's not going to show up. size 20 is absolutely huge.

I edited the maptext_width/height and the font size and it's still not showing up on my screen.
mob
var
obj/HUD/HealthHUD
obj
HUD
maptext_height=500
maptext_width=500
layer = FLY_LAYER
mob
proc
HealthHUD()
if(!HealthHUD)
HealthHUD = new()
HealthHUD.maptext = "<font color = white align=center><font size = 10>[src.Health]"
HealthHUD.screen_loc = "5x,5y"
src.client.screen += HealthHUD
In response to Ronaldy2314
Best response
You need to remove the extraneous "x" and "y" from the screen_loc.
HealthHUD.screen_loc = "5x,5y"

That's your second issue.

x and y aren't valid in screen_loc.

screen_loc = "5,5"
Thanks, both of you for helping me.
Rather than <font size=20>, I'd actually set <span style="font-size: 20pt"> instead. Then you know exactly what size you're dealing with.

BTW, it's really not good form to put whitespace around the = in an HTML attribute.