I'm trying to input text bleeps into my game, but I can't seem to get them to work (likely because I'm using the wiki). Here's my code, what should I do?
Code:
Code: Select all
define k = Character("K", color = "#FFFFFF", callback=k_test_sound, what_prefix='"', what_suffix='"', ctc="ctc_animation", ctc_position="fixed")
init python:
def k_test_sound(event, loop=True, **kwargs):
if event == "show":
renpy.music.play("k_test_sound.ogg", channel ="sound")
elif event == "slow_done" or event == "end":
renpy.music.stop(channel="sound")
label start:
k "Testing, testing"Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/script.rpy", line 6, in script
define k = Character("K", color = "#FFFFFF", callback=k_test_sound, what_prefix='"', what_suffix='"', ctc="ctc_animation", ctc_position="fixed")
File "game/script.rpy", line 6, in <module>
define k = Character("K", color = "#FFFFFF", callback=k_test_sound, what_prefix='"', what_suffix='"', ctc="ctc_animation", ctc_position="fixed")
NameError: name 'k_test_sound' is not defined