Dark/light images of objects

Started by kantor_98, Tue 09/05/2006 11:47:11

Previous topic - Next topic

kantor_98

I have a room which is in dark. At a specific moment, it would be light inside. I solve this, with the help of backrounds. But in the dark, my objects are very shiny, very light ! is there a function to make the objects "dark" ? or I must create 2 images for each object, one dark and one light ?

Candle

You could try object tint.
Code: ags
Tint (object)
(Formerly known as SetObjectTint, which is now obsolete)

Object.Tint(int red, int green, int blue,
            int saturation, int luminance)

Tints the object on the screen to (RED, GREEN, BLUE) with SATURATION percent saturation.
This function applies a tint to a specific object. For the meaning of all the parameters, see SetAmbientTint.

The tint set by this function overrides any ambient tint set for the room. For this reason, passing the SATURATION as 0 to this function does not turn it off - rather, it ensures that no tint is applied to the object (even if an ambient tint is set).

To remove the tint set by this function and return to using the ambient tint for this object, call RemoveTint.

NOTE: This function only works in hi-colour games and with hi-colour sprites.

Example: 

object[1].Tint(0, 250, 0, 30, 100);

will tint object 1 green.

Alynn

There used to be a flashlight plugin that would do this... not sure if it is still compatable, but it blackens the entire screen and lightens it (you could either do it flashlight style, or whole screen style...

but it took care of everything on the screen IIRC

SMF spam blocked by CleanTalk