Page 1 of 1

continuing dialogue without user input

Posted: Tue Nov 17, 2009 11:37 am
by jack_norton
Today while playing Fallout 3, I was wondering (if isn't already present) if could be possible for Renpy to advance in the dialogue (assuming there ARE VOICEOVERS, of course) without user input? It would be still possible to display the texts like subtitles, but once the actor has finished speaking the line, it would advance on next one unless there is a break (like a menu choice).
Is this possible? or maybe already possible with some trick? I think could be nice to have for games that are fully voiced.

I know I could just make a sequence of voices and use the pause command, but I mean some automatic function. I don't want to count how many seconds each spoken line lasts :lol:

Re: continuing dialogue without user input

Posted: Tue Nov 17, 2009 12:05 pm
by PyTom

Code: Select all

init python:

     # This is called every tenth of a second, and ends the interaction if
     # the voice stops.
     def autovoice_check():
          if not renpy.sound.is_playing(channel=2):
               return True

     old_voice = voice

     # Override the voice function. If voice volume is on, then call
     # autovoice_check every tenth of a second.
     def voice(file, **kwargs):
          old_voice(file, **kwargs)

          if _preferences.get_volume('voice'):
               ui.timer(.1, autovoice_check, repeat=True)

Re: continuing dialogue without user input

Posted: Tue Nov 17, 2009 3:08 pm
by jack_norton
wooot, thanks :)