Bug Can't drive colordiffuse using a prefixed VAR
#1
The following works:-

Code:
<variable name="MyColorRed">
    <value>ffff0000</value>
</variable>

<control type="image">
    <colordiffuse>$VAR[MyColorRed]</colordiffuse>
    <texture>white.png</texture>
</control>

However I want to use the color variable but with the alpha added later, like so:-

Code:
<variable name="MyColorRedNoAlpha">
    <value>ff0000</value>
</variable>

<control type="image">
    <colordiffuse>$VAR[MyColorRedNoAlpha,ff]</colordiffuse>
    <texture>white.png</texture>
</control>

Both of these variables give the same result when printed to a label ffff0000

However the second one using a prefix on the $VAR won't drive the colordiffuse. This looks like a bug?
Reply
#2
does (provide addiional comma method work ?
<colordiffuse>$VAR[MyColorRedNoAlpha,ff,]</colordiffuse>

and did you had a closing quote typo in variable and image attribute?

<variable name="MyColorRedNoAlpha'>
<value>ff0000</value>
</variable>
and
="image>

vs
<variable name="MyColorRedNoAlpha">
<value>ff0000</value>
</variable>

="image">
Reply
#3
(2022-01-30, 16:35)mardukL Wrote: does (provide addiional comma method work ?

Nope, adding the extra comma makes no difference.

As I said it works when I print it out as a label for debugging, just not when used in colordiffuse.
 
Quote:and did you had a closing quote typo in variable and image attribute?

Ignore any typos, the actual code is fine.
Reply

Logout Mark Read Team Forum Stats Members Help
Can't drive colordiffuse using a prefixed VAR0