How to add text blips over character 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
Cosmoastidae
Newbie
Posts: 5
Joined: Sat Mar 28, 2020 6:54 pm
Contact:

How to add text blips over character dialogue?

#1 Post by Cosmoastidae » Sat Mar 28, 2020 7:01 pm

I've found a lot of old posts and even on the ren'py forum, the old one, there is a tutorial but I cant find anything on how to do it on the current version.

I'm looking to add a text blip over the dialogue until it stops, like in Pheonix Wright.

Right now I'm using the voice feature to play audio clips but it just keeps going afterward.

Does anyone know how to do this/can link a guide on the new Ren'py forum? Thanks

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

Re: How to add text blips over character dialogue?

#2 Post by gas » Sat Mar 28, 2020 7:31 pm

Code: Select all

init python:
    def blip_callback(event, **kwargs):
        if event == "show":
            renpy.music.play("audio/blipmale.wav", channel="sound", loop=True)
        elif event == "slow_done" or event == "end":
            renpy.music.stop(channel="sound")

adv = Character(None, callback = blip_callback)
By using 'adv' character, all other normal dialogues should inherit, if not add the callback = blip_callback parameter to all of them.
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

Cosmoastidae
Newbie
Posts: 5
Joined: Sat Mar 28, 2020 6:54 pm
Contact:

Re: How to add text blips over character dialogue?

#3 Post by Cosmoastidae » Sat Mar 28, 2020 8:04 pm

gas wrote:
Sat Mar 28, 2020 7:31 pm

Code: Select all

init python:
    def blip_callback(event, **kwargs):
        if event == "show":
            renpy.music.play("audio/blipmale.wav", channel="sound", loop=True)
        elif event == "slow_done" or event == "end":
            renpy.music.stop(channel="sound")

adv = Character(None, callback = blip_callback)
By using 'adv' character, all other normal dialogues should inherit, if not add the callback = blip_callback parameter to all of them.
Would I add the blip_callback in the character define spot like this?

Code: Select all

define E Character("Eileen", callback = blip_callback)
or not?

Or is that not related at all and you just plug in your own sound in the music section and it will go for all voices?

I tried for a while swapping out different things but I just can't get it to work.

Sorry if this is super obvious, thank you!

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

Re: How to add text blips over character dialogue?

#4 Post by gas » Sat Mar 28, 2020 8:14 pm

adv is a special character, if you define something into it, all other speakers will inherit that change.
BUT I can't actually test it if that work for callbacks.
So just try as above.

If by adding to just 'adv' character does nothing to other characters, add 'callback = blip_callback' to all your characters instead.
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

Cosmoastidae
Newbie
Posts: 5
Joined: Sat Mar 28, 2020 6:54 pm
Contact:

Re: How to add text blips over character dialogue?

#5 Post by Cosmoastidae » Sat Mar 28, 2020 8:42 pm

Ok, it took me much to long, but i realized that the characters needed to be UNDER the adv character

thank you so much, its fully working now!

Post Reply

Who is online

Users browsing this forum: Google [Bot], verysunshine