Randomized and continuous text sounds in RenPy

Поделиться
HTML-код
  • Опубликовано: 22 янв 2025

Комментарии • 12

  • @sirdraco6542
    @sirdraco6542 5 месяцев назад +1

    This is a phenomenal video. Thank you.

  • @obviousalias9506
    @obviousalias9506 2 месяца назад +1

    Thanks for this!

  • @thundersalt7031
    @thundersalt7031 6 месяцев назад +2

    this is super helpful, thank you a ton for sharing this man!

  • @Arckanda
    @Arckanda 7 месяцев назад +4

    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?

    • @boredchris
      @boredchris  7 месяцев назад +5

      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)

    • @LuckySpark42
      @LuckySpark42 4 месяца назад

      @@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

    • @boredchris
      @boredchris  4 месяца назад +3

      ​@@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

  • @yyokidd46012
    @yyokidd46012 3 месяца назад

    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

    • @yyokidd46012
      @yyokidd46012 3 месяца назад +2

      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

    • @BambooCalculator
      @BambooCalculator 3 месяца назад

      @@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)

  • @circusletterman
    @circusletterman 3 месяца назад

    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 :)

    • @boredchris
      @boredchris  3 месяца назад

      Good idea! I should have done this sooner, but I've just created a GitHub repo: github.com/bamboocalc/continuous-text-sounds