Page 1 of 1

Quick Colour question

Posted: Sun Dec 12, 2010 11:31 pm
by Robbington
Hey,

Quick question about changing the colour of an object,
During a cut scene I would like one of the characters to leave the room by making the objects colour get darker until it looks like it has dissapeared.
I have got to here, but it doesnt seem to like the code that is stored in the actual objects properties. I have tried passing it a regular hexi number, like CCCC00, but it seems to either to throw an error or change it to black.

idx = ObjFind(2012);
ObjSet(idx, O_COLOR, ff7d62eb);

Any help would be great.

Rob

Posted: Sun Dec 12, 2010 11:48 pm
by Colin
that should be

idx = ObjFind(2012);
ObjSet(idx, O_COLOR,0xff7d62eb);

Posted: Sun Dec 12, 2010 11:53 pm
by Robbington
Ha, I see, you have to define it as a global varible in def.gs before you can pass it.

Thanks Rob,

Your welcome.

Posted: Mon Dec 13, 2010 12:02 am
by Robbington
That looks like a much better way of doing Colin,
thanks.

:)

Posted: Tue Dec 14, 2010 2:44 am
by mickyblueeyes
"That looks like a much better way of doing Colin" :v2_dizzy_scared:

sorry, just had to comment. :v2_dizzy_biggrin:

Posted: Tue Dec 14, 2010 12:43 pm
by Robbington
Thats true,

The only way mine would be more useful is as a time saving measure for a colour you plan to use often.

Rob

Posted: Tue Dec 14, 2010 12:45 pm
by Robbington
Ha! Just re-read that,

Sorry Colin, it was a typo, I'm sure you are a good looking guy and all, but I dont swing that way.