Black and red overlay for flashing lights

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
Godline
Veteran
Posts: 494
Joined: Fri Jun 27, 2014 12:26 am
Completed: numerous
Tumblr: godlinegames
Deviantart: godline-games
itch: godline
Contact:

Black and red overlay for flashing lights

#1 Post by Godline » Wed Feb 26, 2020 2:28 am

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?

User avatar
gas
Miko-Class Veteran
Posts: 718
Joined: Mon Jan 26, 2009 7:21 pm
Contact:

Re: Black and red overlay for flashing lights

#2 Post by gas » Wed Feb 26, 2020 9:52 am

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.
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll be not notified about.

10 ? "RENPY"
20 GOTO 10

RUN

User avatar
Godline
Veteran
Posts: 494
Joined: Fri Jun 27, 2014 12:26 am
Completed: numerous
Tumblr: godlinegames
Deviantart: godline-games
itch: godline
Contact:

Re: Black and red overlay for flashing lights

#3 Post by Godline » Wed Feb 26, 2020 7:41 pm

Thanks so much! I'll try that now!

Post Reply

Who is online

Users browsing this forum: AdventAnyx