If you make another function, let's say "def goomba_speak(event, **kwargs)" and then update your character "goomba" to have "callback=goomba_speak" somewhere in its object. For example...... define goomba = Character("Goomba", callback=goomba_speak)
@@boredchris Hi! I did this and slotted this into the character code, but it comes back with a NameError: name 'goomba_speak' is not defined. I'm not sure how to fix this
@@LuckySpark42 In the script.rpy file, make sure that inside the "init python" block, there exists a function called "goomba_speak" and make sure the init python block appears at the top of the script, before you define any of your characters. I wish RUclips allowed screenshots in comments, but here's a pastebin of what the code should look like: pastebin.com/XzEue63d
hi, sorry but im new to renpy and coding in general, wgat if a wanted to play only a sound for every cps in the game? i don't want different sounds for every characters, i want a general sound for the entire game to play when a first letter is shown and to finish when the last letter of the dialogue is shown, can you help me? great video btw
init python: def play_typing_sound(event, interact=True, **kwargs): if event == "show": renpy.sound.play("audio/sound/beep.ogg", channel="typing", loop=True) elif event in ("slow_done", "end"): renpy.sound.stop(channel="typing", fadeout=0.1) define mario = Character("Mario", callback=play_typing_sound) this is my code and i have an audio called beep in game/audio/sound and is .ogg
@@yyokidd46012 Make sure your new channel "typing" is defined somewhere in your init python block: renpy.music.register_channel("typing", mixer=None, loop=True, stop_on_mute=True, tight=False, file_prefix='', file_suffix='', buffer_queue=True) Then it's just a matter of adding "callback=play_typing_sound" to each of your character objects. Example: define lucas = Character("Lucas", callback=play_typing_sound)
Hey, i was wondering if you could make a pastebin on the code you created in this video or a link to the renpy that you created so i get get a basis on how it works, id appreciate it :)
This is a phenomenal video. Thank you.
Thanks for this!
this is super helpful, thank you a ton for sharing this man!
Let's say I'd like the Goombas to have a different voice set than Mario does. How could it be implemented in the code?
If you make another function, let's say "def goomba_speak(event, **kwargs)" and then update your character "goomba" to have "callback=goomba_speak" somewhere in its object.
For example...... define goomba = Character("Goomba", callback=goomba_speak)
@@boredchris Hi! I did this and slotted this into the character code, but it comes back with a NameError: name 'goomba_speak' is not defined. I'm not sure how to fix this
@@LuckySpark42 In the script.rpy file, make sure that inside the "init python" block, there exists a function called "goomba_speak" and make sure the init python block appears at the top of the script, before you define any of your characters.
I wish RUclips allowed screenshots in comments, but here's a pastebin of what the code should look like:
pastebin.com/XzEue63d
hi, sorry but im new to renpy and coding in general, wgat if a wanted to play only a sound for every cps in the game? i don't want different sounds for every characters, i want a general sound for the entire game to play when a first letter is shown and to finish when the last letter of the dialogue is shown, can you help me? great video btw
init python:
def play_typing_sound(event, interact=True, **kwargs):
if event == "show":
renpy.sound.play("audio/sound/beep.ogg", channel="typing", loop=True)
elif event in ("slow_done", "end"):
renpy.sound.stop(channel="typing", fadeout=0.1)
define mario = Character("Mario", callback=play_typing_sound)
this is my code and i have an audio called beep in game/audio/sound and is .ogg
@@yyokidd46012 Make sure your new channel "typing" is defined somewhere in your init python block:
renpy.music.register_channel("typing", mixer=None, loop=True, stop_on_mute=True, tight=False, file_prefix='', file_suffix='', buffer_queue=True)
Then it's just a matter of adding "callback=play_typing_sound" to each of your character objects.
Example:
define lucas = Character("Lucas", callback=play_typing_sound)
Hey, i was wondering if you could make a pastebin on the code you created in this video or a link to the renpy that you created so i get get a basis on how it works, id appreciate it :)
Good idea! I should have done this sooner, but I've just created a GitHub repo: github.com/bamboocalc/continuous-text-sounds