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.
-
arty
- Regular
- Posts: 104
- Joined: Sat Jan 06, 2018 11:55 am
- Completed: White Monday
- Projects: HATE is a 4 Letter Word
- Organization: KATHARSIS ART
- itch: artys-games
-
Contact:
#1
Post
by arty » Mon Nov 18, 2019 8:15 am
Hey friends.
Let's say I have my character set up like this:
Code: Select all
define l = Character("Lisa", voice_tag="lisa")
But I have like 80 voice clips for her that I don't want to adjust the volume in the files manually for.
How can I tell Ren'Py to change the volume of her voice clips through code?
Putting this after the label start doesn't do anything:
Code: Select all
$ SetCharacterVolume('lisa', volume=0.6)
Any help would be appreciated!
Last edited by
arty on Mon Nov 18, 2019 9:06 am, edited 1 time in total.
-
Remix
- Eileen-Class Veteran
- Posts: 1311
- Joined: Tue May 30, 2017 6:10 am
- Completed: None... yet (as I'm still looking for an artist)
- Projects: An un-named anime based trainer game
-
Contact:
#2
Post
by Remix » Mon Nov 18, 2019 8:50 am
Code: Select all
# inline in label
$ renpy.run( SetCharacterVolume('lisa', volume=0.6) )
# renpy.run() allows you to run a screen action in normal code
# or
default persistent._character_volume['lisa'] = 0.6
# outside any label
Note: If you were planning to allow the user to adjust each characters volume, you'd need to also adjust the max range on the bar for Lisa
Mad Scientist Todo List:
- Finish Improved Event Handler
- Implement DragonBones animation as a Creator Defined Container
- Develop Cartoon Speech Bubble dialogue
- Finish Bitmask collision and rebound vector system
- Develop time based building mechanic
- Others
- *Find a superb artist and actually write a game*
-
arty
- Regular
- Posts: 104
- Joined: Sat Jan 06, 2018 11:55 am
- Completed: White Monday
- Projects: HATE is a 4 Letter Word
- Organization: KATHARSIS ART
- itch: artys-games
-
Contact:
#3
Post
by arty » Mon Nov 18, 2019 9:06 am
The second one didn't work for me (got an error), but the first one seems to have done the trick! Thank you!
Users browsing this forum: No registered users