- The first obj is a red star.
- The second object is the text that I want to center over the red star.
- Then I want to attach the red star and text over the mob taking damage.
What actually happens is I end up with two red stars where one is showing correctly and an unexpected second red star is offset by 16 pixels. and without text.
var/obj/damage/d = new() // Damage counter that shows when monster is hit.
d.layer = DUNGEON_LAYER + 3
var/obj/a = new()
a.maptext = "<font size=2 color=white>34</font>"
a.pixel_x = 16 // center the text on the damage counter
d.overlays += a // Attach the offset maptext obj to the damage indicator.
m.overlays += d // Attach the damage indicator to the mob taking damage.
I saw another post where there was a discussion about some special client layer and I couldn't be sure if I was experiencing the same thing or not.