[SOLVED] Side Image problem

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
Kumiii
Newbie
Posts: 7
Joined: Tue Jun 27, 2017 4:38 am
Contact:

[SOLVED] Side Image problem

#1 Post by Kumiii »

Hello!

I've recently updated my RenPy and I noticed some codes do not work anymore. I'm a beginner in coding, so I am not sure of how to solve my problem. I've been hunting for some solutions and even cookbook, but I cannot really solve my problem due to lack of visualization.

Here is my code :

Code: Select all

define a = DynamicCharacter('player_name',
                            show_side_image=Image("adam/adam.png", xalign=0.0, yalign=1.0))
It gives me this error :

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script.rpy", line 40, in script
    a "My name is [player_name], and I am 12 years old."
Exception: Unknown keyword arguments: side_image

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/script.rpy", line 40, in script
    a "My name is [player_name], and I am 12 years old."
  File "C:\Users\User\Documents\Renpy\renpy\ast.py", line 613, in execute
    renpy.exports.say(who, what, interact=self.interact)
  File "C:\Users\User\Documents\Renpy\renpy\exports.py", line 1147, in say
    who(what, interact=interact)
  File "C:\Users\User\Documents\Renpy\renpy\character.py", line 877, in __call__
    self.do_display(who, what, cb_args=self.cb_args, **display_args)
  File "C:\Users\User\Documents\Renpy\renpy\character.py", line 716, in do_display
    **display_args)
  File "C:\Users\User\Documents\Renpy\renpy\character.py", line 482, in display_say
    what_text = show_function(who, what_string)
  File "C:\Users\User\Documents\Renpy\renpy\character.py", line 700, in do_show
    **self.show_args)
  File "C:\Users\User\Documents\Renpy\renpy\character.py", line 283, in show_display_say
    return renpy.display.screen.get_widget(screen, "what", layer)
  File "C:\Users\User\Documents\Renpy\renpy\display\screen.py", line 1194, in get_widget
    screen.update()
  File "C:\Users\User\Documents\Renpy\renpy\display\screen.py", line 578, in update
    self.screen.function(**self.scope)
  File "C:\Users\User\Documents\Renpy\renpy\ast.py", line 152, in apply_arguments
    return parameters.apply(args, kwargs, ignore_errors)
  File "C:\Users\User\Documents\Renpy\renpy\ast.py", line 139, in apply
    raise Exception("Unknown keyword arguments: %s" % ( ", ".join(values.keys())))
Exception: Unknown keyword arguments: side_image

Windows-7-6.1.7601-SP1
Ren'Py 6.99.12.4.2187
How exactly should I code my side image and what do I need to change?
Last edited by Kumiii on Wed Jul 26, 2017 1:54 am, edited 1 time in total.

User avatar
warmsundae
Regular
Posts: 61
Joined: Tue Feb 24, 2015 9:51 pm
Skype: electriclan
Soundcloud: lanterny
Location: korea
Contact:

Re: Side Image problem

#2 Post by warmsundae »

your method looks a bit different from the one in the documentation. I can't test it right now, so sorry if it's outdated or you've already tried it.

User avatar
wyverngem
Miko-Class Veteran
Posts: 615
Joined: Mon Oct 03, 2011 7:27 pm
Completed: Simple as Snow, Lady Luck's Due,
Projects: Aether Skies, Of the Waterfall
Tumblr: casting-dreams
itch: castingdreams
Location: USA
Contact:

Re: Side Image problem

#3 Post by wyverngem »

I didn't test this, but try

Code: Select all

define a = DynamicCharacter('player_name',
                            image="adam_side")
image side adam_side = Image("adam/adam.png", xalign=0.0, yalign=1.0)

User avatar
Kumiii
Newbie
Posts: 7
Joined: Tue Jun 27, 2017 4:38 am
Contact:

Re: Side Image problem

#4 Post by Kumiii »

Sorry, I tried both methods, while the game works without errors, the side image is still not appearing.

Is there any other methods I can use, or anything I need to change in screens.rpy or options.rpy?

User avatar
wyverngem
Miko-Class Veteran
Posts: 615
Joined: Mon Oct 03, 2011 7:27 pm
Completed: Simple as Snow, Lady Luck's Due,
Projects: Aether Skies, Of the Waterfall
Tumblr: casting-dreams
itch: castingdreams
Location: USA
Contact:

Re: Side Image problem

#5 Post by wyverngem »

Sorry forgot this important bit of code. For some reason it doesn't work without the config.side_image_change_transform

Code: Select all

image side Sophia_side = Image("images/sophia.png", yalign=1.0, xalign=0.0)
define s = Character("Sophia", image="Sophia_side")

define config.side_image_change_transform = change_transform

transform change_transform(old, new):
    contains:
        old
        alpha 1.0
        linear 0.3 alpha 0.0
    contains:
        new
        alpha 0.0
        linear 0.3 alpha 1.0

User avatar
Kumiii
Newbie
Posts: 7
Joined: Tue Jun 27, 2017 4:38 am
Contact:

Re: Side Image problem

#6 Post by Kumiii »

For some reason the new version of RenPy kept insisting me to define change_transform, but after some alteration I got the code to work!

Thank you very much!

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], piinkpuddiin