turf/grass
var/bgcolor="#00a500"
New()
..()
text="<font bgcolor=[bgcolor]> "
Prodigal Squirrel
ID:262396
![]() Jun 4 2005, 7:24 pm
|
|
In DM, this doesn't work. It merits no compiler errors, it just doesn't change the color. But it's only on turfs, doing this for a mob or obj would work perfectly fine.
turf/grass Prodigal Squirrel |
![]() Jun 4 2005, 8:11 pm
|
|
Works fine for me, are you sure they aren't just covered up by an /obj's background color? =)
|
The verb I'm using is changing the text of the square underneath the mob. The mob uses no bgcolor, however. Could that be what is messing things up?
Also, the proc the verb is using will work on any mobs or objects, but not just any turf. I simplified my question because my original post addressing this dilema was a little lengthy. If you would like to read the original post with the proc that's messing up, read this post. One last thing, I have the following code in my game: atom I had to type that out (not at home), so it's a little simplified. under New() is some checking if color and/or bgcolor exist, then it sets the text based on what does and doesn't exist. I would think that work to fill out the text var for a turf. Prodigal Squirrel |
If the mob doesn't use a bgcolor then it will be transparent, so unless there's another atom above the turf that's not the problem. The only other thing I can think of is that the ColorObj's hex variable doesn't contain a # (or one isn't put into the mix when setting the text variable).
|
proc/SetRGB(var/red,var/green,var/blue) That's the proc that sets the ColorObj's hex variable. rgb returns a string in hex color format. Prodigal Squirrel |