Author Topic: How to change name color?  (Read 1582 times)

How do I change someones name color?

%player.setShapeNameColor("R G B"); where the color codes range from 0 to 1. (e.g. 1 1 1 is white, 0.5 0 0 is dark red)

Thanks.

So all I do is

%player.setShapeNameColor("1 1 1");

If I wanted a players name white, or would I do like

%this.setShapeNameColor("1 1 1");

Sorry, I'm kinda new to torque.

I thought v11 broke this.

I thought v11 broke this.

Not the color; it blocked changing the text.
And Pew, it depends on which variable you used.


Anyone mind showing me a chart for these colors? I need a cyan.

Anyone mind showing me a chart for these colors? I need a cyan.

It'd be 0 1 1 for pure cyan. There's no real chart, since there are infinite numbers between 0 and 1; just learn how red, green, and blue balance with each other and you can pretty much get any color in an instant.

%xxx.player.setshapenamecolor()

Thanks.

So all I do is

%player.setShapeNameColor("1 1 1");

If I wanted a players name white, or would I do like

%this.setShapeNameColor("1 1 1");

Sorry, I'm kinda new to torque.
Depends which function you're using and which variables you have. If you're putting this in a package of e.g. GameConnection::spawnPlayer(%this), you'd have to do %this.player.setShapeNameColor("1 1 1"), but if you're doing Player::someFunction(%player) then you'd do %player.setShapeNameColor("1 1 1").

When I tried it it was hexadecimal.