Jump to content

using colour tweening to turn an object white?


pickleplayer

Recommended Posts

The colour tweening component is a pretty nifty way to change the colors and hues of in-game objects without changing their sprites.

inst.components.colourtweener:StartTween({1,0,0,1}, (2), nil)

where the braces are  ( {red, green, blue, opacity}, (time), (function))  So the above code turns the object red over a period of 2 seconds.

 

But it seems you can make any color EXCEPT white. putting the numbers to {0,0,0,1} makes it black, and {1,1,1,1} just puts it at it's original colors. 

It'll only let you use numbers between 0 and 1 (I've tried -1 and 2, it doesn't work).

 

Is there any other way to turn an entity white? Maybe without tweening?

 

Link to comment
Share on other sites

You can use "hightlight", but hovering over the entity twice (not once, twice) turns it back to normal, so it only works for FX and NOCLICK prefabs.

 

I recommend to use handsome matts tool to extract the image and photo-edit it.

 

EDIT: Notice that chromiumboy's method is used by the highlight component and thus (probably) suffers from the issue too.

Link to comment
Share on other sites

Try 'inst.AnimState:SetAddColour(1,1,1,1)'

 

It's not pure white, but its pretty close :-)

 

Use 'inst.AnimState:SetAddColour(0,0,0,0)' to return to normal.

 

Yesss, this is perfect!!

It looks so much better as a color modifier too. It actually adds color instead of just "sucking out all of the other colors to make it one color" 

 

Thank you!

 

 

there wouldn't happen to be a tweening method for this too, would there?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...