continuing dialogue without user input

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
User avatar
jack_norton
Lemma-Class Veteran
Posts: 3978
Joined: Mon Jul 21, 2008 5:41 pm
Completed: Too many! See my homepage
Projects: A lot! See www.winterwolves.com
Tumblr: winterwolvesgames
Contact:

continuing dialogue without user input

#1 Post by jack_norton » Tue Nov 17, 2009 11:37 am

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:
follow me on Image Image Image Image
computer games

User avatar
PyTom
Ren'Py Creator
Posts: 15223
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: continuing dialogue without user input

#2 Post by PyTom » Tue Nov 17, 2009 12:05 pm

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)
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
jack_norton
Lemma-Class Veteran
Posts: 3978
Joined: Mon Jul 21, 2008 5:41 pm
Completed: Too many! See my homepage
Projects: A lot! See www.winterwolves.com
Tumblr: winterwolvesgames
Contact:

Re: continuing dialogue without user input

#3 Post by jack_norton » Tue Nov 17, 2009 3:08 pm

wooot, thanks :)
follow me on Image Image Image Image
computer games

Post Reply

Who is online

Users browsing this forum: No registered users