Hey, so 2 years later I am back!
I've tried to recreate this (however, not using the second "custom" say screen) but it's not working and crashing with this error:
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/script.rpy", line 5149, in script
mil "Hmm."
Exception: Unknown keyword arguments: namebox_background
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/script.rpy", line 5149, in script
mil "Hmm."
File "/Applications/renpy-6.99.11-sdk/renpy/ast.py", line 706, in execute
renpy.exports.say(who, what, *args, **kwargs)
File "/Applications/renpy-6.99.11-sdk/renpy/exports.py", line 1336, in say
who(what, *args, **kwargs)
File "/Applications/renpy-6.99.11-sdk/renpy/character.py", line 1139, in __call__
self.do_display(who, what, cb_args=self.cb_args, **display_args)
File "/Applications/renpy-6.99.11-sdk/renpy/character.py", line 842, in do_display
**display_args)
File "/Applications/renpy-6.99.11-sdk/renpy/character.py", line 552, in display_say
what_text = renpy.display.screen.get_widget(what_text[0], what_text[1], what_text[2])
File "/Applications/renpy-6.99.11-sdk/renpy/display/screen.py", line 1284, in get_widget
screen.update()
File "/Applications/renpy-6.99.11-sdk/renpy/display/screen.py", line 625, in update
self.screen.function(**self.scope)
File "/Applications/renpy-6.99.11-sdk/renpy/ast.py", line 158, in apply_arguments
return parameters.apply(args, kwargs, ignore_errors)
File "/Applications/renpy-6.99.11-sdk/renpy/ast.py", line 145, in apply
raise Exception("Unknown keyword arguments: %s" % ( ", ".join(values.keys())))
Exception: Unknown keyword arguments: namebox_background
Darwin-17.7.0-x86_64-i386-64bit
Ren'Py 7.3.2.320
My Friend Katie 1.0
Wed Sep 11 18:26:39 2019
Here's what I have in screens:
Code: Select all
screen say(who, what):
style_prefix "say"
if (sayscreen_label is not None):
window at say_window_animation:
id "window"
if who is not None:
window:
id "namebox"
style "namebox"
text who id "who"
text what id "what" at text_fade_in
else:
window:
id "window"
if who is not None:
window:
background namebox_background ## added this
id "namebox"
style "namebox"
text who id "who"
text what id "what"
## If there's a side image, display it above the text. Do not display on the
## phone variant - there's no room.
if not renpy.variant("small"):
add SideImage() xalign 0.0 yalign 1.0
And my characters in script.rpy:
Code: Select all
define mil = Character("Millie", who_xpos=46, who_ypos=40, color="#f7f7f6", window_xpos=440, window_ypos=790, window_xmaximum=970, window_xfill=True, window_background="thought", show_namebox_background = "gui/namebox_millie.png", callback=speaker("millie"), all_at_once=False)
define dad = Character("Dad", who_xpos=46, who_ypos=40, color="#f7f7f6", window_xpos=440, window_ypos=790, window_xmaximum=970, window_xfill=True, window_background="thought", show_namebox_background = "gui/namebox_dad.png", callback=speaker("millie"), all_at_once=False)
These are a bit of a mouthful!
I'll dig out my old files if I can't find an answer, but it seems like all my code is correct... I just don't have the second custom say screen.
Any ideas?