Page 1 of 1

Black and red overlay for flashing lights

Posted: Wed Feb 26, 2020 2:28 am
by Godline
Okay, this should be easy but I haven't done much with renpy is like over a year. Sooo...I'm looking to recreate a spooky emergency lighting effect. Like how it goes black and then goes red where you can sort of see stuff and then goes black again.

I mean I could do a night filter like this:
image bg ruin_path_night = im.MatrixColor("img/bg/ruin_path.png",
im.matrix.tint(0.5,0.5,0.6)
* im.matrix.brightness(-0.2))

(from viewtopic.php?t=24580)

But what about a red overlay and putting it together for that really jarring effect of when a place goes in full lockdown mode and nothing is working?

Re: Black and red overlay for flashing lights

Posted: Wed Feb 26, 2020 9:52 am
by gas
On a previous attempt I simply created a red picture.

Code: Select all

image redpic = Solid((255,0,0,125))
Then created a transform

Code: Select all

transform alert:
    alpha 1.0
    linear 1.0 alpha 0.0
    linear 1.0 alpha 0.8
    repeat
And used it as a normal image

Code: Select all

show redpic at alert
That broadly worked for me.

Re: Black and red overlay for flashing lights

Posted: Wed Feb 26, 2020 7:41 pm
by Godline
Thanks so much! I'll try that now!