How to Make Characters 'Pop Out'?

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
ArizaLuca
Veteran
Posts: 241
Joined: Tue Feb 20, 2018 12:59 pm
Completed: Through the Screen, Riddle Me This, Trust Fall, Phobias, Another Adventure
Projects: The Souls in the Seams, Fata Morgana, Minecraft: Story Mode - Behind the Scenes
Organization: Astral Autumn Games
Tumblr: astralautumngames
Deviantart: ArizaLuca
itch: astralautumngames
Contact:

How to Make Characters 'Pop Out'?

#1 Post by ArizaLuca »

During DDLC, I noticed that when multiple characters were onscreen and a character was speaking, it would sort of 'pop' into the foreground and become lighter in color. When they were done speaking or done being highlighted, they would retreat back into the background. Does anybody know how to do that?

Thank you!

kivik
Miko-Class Veteran
Posts: 786
Joined: Fri Jun 24, 2016 5:58 pm
Contact:

Re: How to Make Characters 'Pop Out'?

#2 Post by kivik »

Not sure how DDLC does it, but you can do it by creating a "speaking" version of your character images, and add a config variable to make that image load instead of the default.

Code: Select all

define config.speaking_attribute = "speaking"
This defines what image tag to add to your speaking character, so "image eileen speaking" will be used instead of "image eileen" when she's speaking.

So you can create your images:

Code: Select all

image eileen:
    "eileen.png"

image eileen speaking:
    "eileen.png"
    # add transforms here
To lighten the character, someone else had helped me achieve that using this code:

Code: Select all

transform alpha_mask:
    alpha 0.25
transform lighten(child):
    AlphaBlend(At(child, alpha_mask), child, Solid("#fff"), alpha=True)
# now add them to the speaking image:
image eileen speaking:
    At("eileen.png", lighten)
    # add other transforms here
This method allows for dynamic images, so you can use variables inside the image filename.

You'll have to tinker a bit, but this should be a good basis for what you want :)

Post Reply

Who is online

Users browsing this forum: Google [Bot]