I'm pretty new to Ren'Py and I've been having issues with getting my side images to show up.
In my game the player starts with a choice of a "male" or "female" character in the form of two imagebuttons, followed by a "choose your name".
After that the chosen side image should show up whenever the main character speaks, but even after all the YT tutorials and browsing the LSForum I can't seem to make it work.
this is the code for the imagebuttons (which works perfectly, I just have to link them to an actual choice now)
Code: Select all
call screen char_choice
screen char_choice():
add "bg black"
modal True
imagebutton auto "bg_male_%s":
focus_mask True
hovered SetVariable("screen_tooltip", "male")
unhovered SetVariable("screen_tooltip", "")
action Jump ("choose_male")
imagebutton auto "bg_female_%s":
focus_mask True
hovered SetVariable("screen_tooltip", "female")
unhovered SetVariable("screen_tooltip", "")
action Jump ("choose_female")
label choose_male:
jump begin
label choose_female:
jump begin
label begin:
Code: Select all
define player = Character("player", image="side_male_normal.png", xalign=0, yalign=1.0)
image side player normal = ("side_male_normal.png")
init python:
config.side_image_tag = "player"
$ player = renpy.input("What is your name?", default="Traveler", length=15)
player normal "So this is what it's come to now?"
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/script.rpy", line 47, in script
player normal "So this is what it's come to now?"
File "renpy/common/00library.rpy", line 268, in say
who(what, interact=interact, *args, **kwargs)
Exception: Say has image attributes (u'normal',), but there's no image tag associated with the speaking character.
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/script.rpy", line 47, in script
player normal "So this is what it's come to now?"
File "renpy/ast.py", line 721, in execute
renpy.exports.say(who, what, *args, **kwargs)
File "renpy/exports.py", line 1417, in say
renpy.store.say(who, what, *args, **kwargs)
File "renpy/common/00library.rpy", line 268, in say
who(what, interact=interact, *args, **kwargs)
File "renpy/character.py", line 1189, in __call__
old_attr_state = self.handle_say_attributes(False, interact)
File "renpy/character.py", line 1001, in handle_say_attributes
if self.resolve_say_attributes(predicting, attrs):
File "renpy/character.py", line 927, in resolve_say_attributes
raise Exception("Say has image attributes %r, but there's no image tag associated with the speaking character." % (attrs,))
Exception: Say has image attributes (u'normal',), but there's no image tag associated with the speaking character.
Windows-10-10.0.19041
Ren'Py 7.4.11.2266
Testing Site 1.0
Sun May 22 14:59:16 2022