stegge
11-16-2007, 03:57 PM
hi there!
i have a simple qustion. i want to compare the wirecolor of 2 objects. if it is the same, than it should change. i have an idea for the script, my only problem is the comarison.
for the change of an object from black to white i tried:
if $.wirecolor = color 0 0 0 then $.wirecolor = color 255 255 255
i get an error message. it seems like i can only use bool-variables for the if-sentence.
after that, i tried to make an array of the wirecolor and compare the 3 color-values after and after:
array = #($.wirecolor)
when i compare this array with another array, i get the same (bool) error-message. and in this array, there are not only numbers; the string:color is included
i think this is an easy operation. where is my fault?
greez
stegge
i have a simple qustion. i want to compare the wirecolor of 2 objects. if it is the same, than it should change. i have an idea for the script, my only problem is the comarison.
for the change of an object from black to white i tried:
if $.wirecolor = color 0 0 0 then $.wirecolor = color 255 255 255
i get an error message. it seems like i can only use bool-variables for the if-sentence.
after that, i tried to make an array of the wirecolor and compare the 3 color-values after and after:
array = #($.wirecolor)
when i compare this array with another array, i get the same (bool) error-message. and in this array, there are not only numbers; the string:color is included
i think this is an easy operation. where is my fault?
greez
stegge
