Sound Effects in the middle of text

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
ForgottenVision
Regular
Posts: 59
Joined: Wed May 19, 2010 7:03 am
Projects: The Student Council
Contact:

Sound Effects in the middle of text

#1 Post by ForgottenVision »

I've searched everywhere and I can't find it, but is there a way to play a sound effect while in the middle of dialogue?

So, something like: "Sorry {i}Eliza{/i}, but you're too crazy for me!"

Would it be possible to have the SE play when the word Eliza is said? (Like, as the discovery of a name.)
Racheya @ Forgotten Vision Presents...
When Sapphires Cry - Episode 1 [Completed] (Not Publicly Released)
One Afternoon [Completed] - More Info/Download here
The School Council [WIP] - BxG
When Sapphires Cry - Episode 2 [Postponed]

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Sound Effects in the middle of text

#2 Post by Alex »

Well, you can try to mess with extended text, like

Code: Select all

label start:

    e "You've created a new Ren'Py game."

    e "Once you add a story, pictures, and {nw}"
    play sound "18005551212.ogg"
    extend " music, you can release it to the world!"
As reference says:
"{nw}, at the end of a block of text, causes the current interaction to terminate immediately once the text is fully shown. It only makes sense to use this in dialogue text, where the effect is to cause slow text to dismiss the interaction once it has been fully displayed."
http://www.renpy.org/wiki/renpy/doc/ref ... #Text_Tags
"extend will cause the last character to speak to say a line of dialogue consisting of the last line of dialogue spoken, "{fast}", and the dialogue given to extend. This can be used to have the screen change over the course of dialogue. Extend is aware of NVL-mode, and treats it correctly."
http://www.renpy.org/wiki/renpy/doc/ref ... Characters

ForgottenVision
Regular
Posts: 59
Joined: Wed May 19, 2010 7:03 am
Projects: The Student Council
Contact:

Re: Sound Effects in the middle of text

#3 Post by ForgottenVision »

That works! Thank you very much!!! ^_^
Racheya @ Forgotten Vision Presents...
When Sapphires Cry - Episode 1 [Completed] (Not Publicly Released)
One Afternoon [Completed] - More Info/Download here
The School Council [WIP] - BxG
When Sapphires Cry - Episode 2 [Postponed]

Post Reply

Who is online

Users browsing this forum: No registered users