Author Topic: Colors.... If Trans....?  (Read 519 times)

Is it possible to find if a color is transparent by it's id?

Like

if(%brick.getColorId().Transparency > 0){
do stuff
}

?

%brick.getColorId().dump();

Then look for it

Theres not ;-;

Anyways, another question.

Do scripts have a limit to how many characters they can hold? My script keeps getting syntax errors at the end, but when I delete a blank line, the syntax will move closer to the end, until it finally has no errors.

Check the line or lines above the error. It might be a function, incorrect brackets, anything. It's just telling you it has no clue really.

the transparency is in the color

it's not a variable
you'd have to find the alpha of the brick's color.

Use getColorIDTable(), it returns a vector of four numbers. The last is the transparency.

Use getColorIDTable(), it returns a vector of four numbers. The last is the transparency.

Thank you :)