Page 1 of 1

how do you changed Brightness/Contrast

PostPosted: Sun May 10, 2009 7:49 pm
by dekoomer
i have a game and when my Main character hits a Monster i like the monster Brighten like almost
to white then dim back to it's original state, but i don't know how to do any of this, and i don't want to changed the animation itself

Re: how do you changed Brightness/Contrast

PostPosted: Sun May 10, 2009 7:54 pm
by skydereign
The only way to do this, I think, is to start with a bright image. So your sprite should be increased in brightness, then the actor's rgb should be lowered. That way, when you want it to brighten, increase the rgb. I don't think you can do contrast.

Re: how do you changed Brightness/Contrast

PostPosted: Sun May 10, 2009 8:29 pm
by dekoomer
Where can i change the charater rgb?

Re: how do you changed Brightness/Contrast

PostPosted: Sun May 10, 2009 8:44 pm
by skydereign
The rgb are actor variables. To manipulate them, you would use the script editor. Since you want the actor to initally be dim, set an event, Create Actor, and put Script Editor.
Hero->CreateActor->Script Editor
Code: Select all
r=127;
b=127;
g=127;

If you didn't know, the rgb values go from 0-255. So upon collision, set the values to 0. In the DrawActor event, you would put this
Hero->DrawActor->Script Editor
Code: Select all
if(r>127)
{
  r--;
  g--;
  b--;
}


Be warned, this will not do contrast, so you will lose quality, pending on the detail of your sprite. But if you don't care for any potential contrast loss, this should work. The red green blue values are really better for dimming a picture, so you should start with a bright pic, instead of making your pics brighter. That way you should be happy with the style.

Re: how do you changed Brightness/Contrast

PostPosted: Sun May 10, 2009 9:37 pm
by dekoomer
THANK YOU!!

**==SOOO MUCH==**

i love people like you

Re: how do you changed Brightness/Contrast

PostPosted: Sun May 10, 2009 10:54 pm
by jimmynewguy
dekoomer wrote:i love people like you

then you'll love these forums :lol:

Re: how do you changed Brightness/Contrast

PostPosted: Thu May 28, 2009 4:55 am
by Hblade
Brightness, make a white image, then change the transparency of the image. The more transparent it is, the less brightness it will be. Same method with darkness, use a black image.

Re: how do you changed Brightness/Contrast

PostPosted: Mon Jun 01, 2009 2:06 am
by BlarghNRawr
or make a white actor and use the rgb to change it to the desired darkness