Game Development Community

color behavior [solved]

by Max Kielland · in Torque Game Builder · 10/11/2009 (7:15 pm) · 2 replies

Hi everyone.

I'm creating a behavior with a color field:

%template.addBehaviorField(ColorDisabled,"Color disabled", color, ?????);

After the type "color" there can be a default value, but how do you code a color type field?
I have tried a couple of different styles like:

0xRRGGBBAA (R G B a)
"r,g,b,a"
"r g b a"
"r" NL "g" NL "b" NL "a"

None of them works.

Any ideas?

#1
10/11/2009 (7:24 pm)
It is in the format, "r g b a", where each value lies between 0 and 1.
#2
10/11/2009 (7:29 pm)
Thanks, I just found it out myself by dumping a shape :)
Yes, my fault was that I exceeded 1.

Thank you for your time.