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.
krswwrkk
Newbie
Posts: 5 Joined: Sun Mar 18, 2018 2:42 am
Contact:
#1
Post
by krswwrkk » Sun Mar 18, 2018 2:51 am
Hey, newbie here.
For some reason, my side image for a character doesn't stay in the same place whenever the character has more than one line of dialogue. This is the code I'm using:
Code: Select all
transform change_transform(old, new):
contains:
old
yalign 1.0
xpos 0.0 xanchor 0.0=
linear 0.2 xanchor 1.0
contains:
new
yalign 1.0
xpos 0.0 xanchor 1.0
linear 0.2 xanchor 0.0
define config.side_image_change_transform = change_transform
transform same_transform(old, new):
old
new with Dissolve(0.2, alpha=True)
define config.side_image_same_transform = same_transform
define e = Character("Kanan", color="#7fffd4", what_color='#3FD7AE', image = "kn", window_left_padding=160)
style window:
left_padding 150
image side kn:
"side_kanantest.png"
yoffset -182
The image moves to the left, and at the bottom.
If anyone could help, that'd be appreciated!
rayminator
Miko-Class Veteran
Posts: 793 Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:
#2
Post
by rayminator » Sun Mar 18, 2018 9:22 am
in screens look for
Code: Select all
if not renpy.variant("small"):
add SideImage() xpos 45 ypos 550
then in a new file or in the script add
Code: Select all
# side images #
image side Silvie:
"4.png"
size(150,165)
init python:
config.side_image_prefix_tag = 'side'
then to define a character
Code: Select all
define si = Character("Silvie", image="silvie")
hope this helps it works for me
krswwrkk
Newbie
Posts: 5 Joined: Sun Mar 18, 2018 2:42 am
Contact:
#3
Post
by krswwrkk » Sun Mar 18, 2018 2:26 pm
I added that, but it didn't change anything for me except for the size, so I've tried to edit some things. I ended up having the picture stay correctly, but now there's another copy of the image below the correct picture. I don't know how to get rid of it. Here is my code for script.rpy:
Code: Select all
transform change_transform(old, new):
contains:
old
yalign 1.0
xpos 0.0 xanchor 0.0
linear 0.2 xanchor 1.0
contains:
new
yalign 1.0
xpos 0.0 xanchor 1.0
linear 0.2 xanchor 0.0
define config.side_image_change_transform = change_transform
transform same_transform(old, new):
old
new with Dissolve(0.2, alpha=True)
define config.side_image_same_transform = same_transform
define e = Character("Kanan", color="#7fffd4", what_color='#3FD7AE', image = "kn", window_left_padding=160)
style window:
left_padding 150
image side kn:
"side_kanantest.png"
size(400,280)
yoffset -182
image side kh:
"side_kananhappy.png"
size(400,280)
yoffset -182
init python:
config.side_image_prefix_tag = 'side'
And here is my screen code:
Code: Select all
if not renpy.variant("small"):
add SideImage() xalign 0.0 yalign 1.0
add SideImage() xpos 10 ypos 258
rayminator
Miko-Class Veteran
Posts: 793 Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:
#4
Post
by rayminator » Sun Mar 18, 2018 2:56 pm
this is why there are double side image
Code: Select all
image side kn:
"side_kanantest.png"
size(400,280)
yoffset -182
image side kh:
"side_kananhappy.png"
size(400,280)
yoffset -182
for this you only need the one not two so you have to pick which one works for you
Code: Select all
if not renpy.variant("small"):
add SideImage() xalign 0.0 yalign 1.0
add SideImage() xpos 10 ypos 258
i don't know how to show different side images that have different emotions but this might help
Side Images
krswwrkk
Newbie
Posts: 5 Joined: Sun Mar 18, 2018 2:42 am
Contact:
#5
Post
by krswwrkk » Sun Mar 18, 2018 3:14 pm
I tried that, but now when the character says one line of dialogue now, it goes back to the bottom. The double image goes away when I delete
Code: Select all
add SideImage() xalign 0.0 yalign 1.0
The image only stays in the same place when there is more than one sentence of dialogue.
Users browsing this forum: Majestic-12 [Bot]