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.