How to fade out dialogue?

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
Tempus
Miko-Class Veteran
Posts: 519
Joined: Sat Feb 16, 2013 3:37 am
Completed: Ladykiller in a Bind
Projects: StoryDevs
Tumblr: jakebowkett
Deviantart: jakebowkett
Github: jakebowkett
Location: Australia
Contact:

How to fade out dialogue?

#1 Post by Tempus » Sat Mar 16, 2013 11:57 am

I'm creating an opening scene where I want some text to fade in, then fade back out. Using the narrator, I've got the text appearing letter by letter, using the cps tag, and I've placed wait tags of varying times after periods and commas. I did this because I wanted the text to appear in a rhythm similar to how it would be read.

I'm encountering two problems:
  1. First, I can fade in the narration text fine by appending "with dissolve" at the end, but this - for reasons unknown - negates the first wait tag in the text. Subsequent wait tags are not affected. Initially I thought it might be because the dissolve was still active when the first wait tag was reached, but I reduced the dissolve time and it still happened.
  2. Second, I don't have a clue how to fade it out since when Ren'Py receives user input or the dialogue / narration has a no wait tag at the end any text disappears immediately before executing the next line of the script leaving no chance to fade it...
I also tried the "show text" ... thing, which I liked, but I couldn't find a way to retain the pauses after punctuation like I did with the narrator speaking. I have been testing, Googling and lemmasofting this tonight and could not find a way to solve this - any help would be appreciated.

This is what my script looks like:

Code: Select all

init:
    $ slowDissolve = Dissolve(4.35)

image bg01 = "bg_01.jpg"

label start:
    play music "hungryLikeTheWolf.mp3" fadein 1.0
    show black
    show bg01 with slowDissolve
    "{cps=12}Bla bla bla I'm a narrator and I'm narrating.{w=1.0} Oh yeah, this is some good narration.{w=1.0} Definitely some good narration,{w=0.3} though perhaps a little dull.{w=1.0} Well you know how it is,{w=0.3} sometimes you just write whatever and hope for the best.{w=1.0} That's right.{w=1.0} Oh look now I'm closing with a mysterious ellipsis{w=0.2}.{w=0.40} .{w=0.40} .{/cps}" with dissolve

User avatar
SundownKid
Lemma-Class Veteran
Posts: 2299
Joined: Mon Feb 06, 2012 9:50 pm
Completed: Icebound, Selenon Rising Ep. 1-2
Projects: Selenon Rising Ep. 3-4
Organization: Fastermind Games
Deviantart: sundownkid
Location: NYC
Contact:

Re: How to fade out dialogue?

#2 Post by SundownKid » Sat Mar 16, 2013 12:35 pm

I have a similar problem on my own game where I want the textbox to fade in when the next person talks, but when I try to put a transform on the textbox it causes it to be faded by wait tags as well.

User avatar
nyaatrap
Crawling Chaos
Posts: 1824
Joined: Mon Feb 13, 2012 5:37 am
Location: Kimashi Tower, Japan
Contact:

Re: How to fade out dialogue?

#3 Post by nyaatrap » Mon Mar 18, 2013 11:41 am

You can't control most hide effects on screens which is called by calls_in_newcontext functions. To control them, you need to call them manually, or you need some special coding.

Actually, I have many bugs on screens I didn't report. I don't know they're ren'py bug or just my code... I'm having troubles to tracking down those core issues to tell PyTom useful information.

Post Reply

Who is online

Users browsing this forum: No registered users