Oookay, here's the latest update on my efforts to make this work...
I was advised by someone over on reddit to do this:
In the screens.rpy, In the input screen section, the line
was altered to:
and then, in the script.rpy, I created this bit of python before the label start:
Code: Select all
init python:
def Typing(what):
renpy.music.play(renpy.random.choice(['sounds/typing1.wav','sounds/typing2.wav','sounds/typing3.wav']), channel="audio")
That got the typing sounds working, but... the Enter key no longer worked.
After consulting the rest of the code in this current forum thread, I cobbled together this:
Code: Select all
init python:
def Typing(what):
if renpy.display.interface.last_event.__dict__.get("key", None) == 8:
renpy.jump("nametyped")
else:
renpy.music.play(renpy.random.choice(['sounds/typing1.wav','sounds/typing2.wav','sounds/typing3.wav']), channel="audio")
This.. ALMOST works.
Two important points:
8 is the integer for the backspace key. I put it there for testing purposes because I don't know the one for the return key.
after the renpy.jump advances to the nametyped label, the project crashes at the first line of character dialog it encounters.
Code: Select all
[code]
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/script.rpy", line 255, in script
x "Dialogue goes here."
KeyError: u'name'
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/script.rpy", line 255, in script
x "Dialogue goes here."
File "renpy/ast.py", line 716, in execute
renpy.exports.say(who, what, *args, **kwargs)
File "renpy/exports.py", line 1417, in say
who(what, *args, **kwargs)
File "renpy/character.py", line 1208, in __call__
who = self.prefix_suffix("who", self.who_prefix, who, self.who_suffix)
File "renpy/character.py", line 1129, in prefix_suffix
return (sub(prefix) + sub(body) + sub(suffix))
File "renpy/character.py", line 1109, in sub
return renpy.substitutions.substitute(s, scope=scope, force=force, translate=translate)[0]
File "renpy/substitutions.py", line 270, in substitute
s = formatter.vformat(s, (), kwargs)
File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python2.7/string.py", line 563, in vformat
File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python2.7/string.py", line 585, in _vformat
File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python2.7/string.py", line 646, in get_field
File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python2.7/string.py", line 605, in get_value
KeyError: u'name'
Windows-7-6.1.7601-SP1
Ren'Py 7.4.8.1895
Zero Day 1.0
Sat Oct 16 02:41:39 2021
So close, and yet so far.