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.
-
ninjaK4T_06
- Newbie
- Posts: 6
- Joined: Fri Nov 30, 2018 6:19 am
-
Contact:
#1
Post
by ninjaK4T_06 » Thu Jan 03, 2019 7:20 am
I'm using
this post to make random characters, and I made a screen thingy to view all the characters generated. I want to put images before the characters names, but when I try to add them,
it just puts the image above the text like this???
Whenever I try to manually position the image using xpos and ypos, it doesn't show. also, if i try to use align, it won't overlap the "line" the text is on and therefore won't go before the text where i want it to be
Here's the I'm using btw
Code: Select all
side "c r":
area (280,50,1000, 600)
viewport id "character screen":
mousewheel True
vbox:
for c in random_characters:
showif c.gender == "male":
add "images/gender male.png" yalign 1
else:
add "images/gender female.png" yalign 1
text "{} {} from {}, {} years old. Trained for {} {}".format (c.name, c.surname, c.nationality, c.age, c.trainee, c.period)
vbar value YScrollValue("character screen")
so yeah, that's my problem. any tips on how to fix this wuold be much appreciated

Last edited by
ninjaK4T_06 on Fri Jan 04, 2019 1:10 am, edited 1 time in total.
-
SONTSE
- Regular
- Posts: 95
- Joined: Sun Nov 24, 2013 10:49 pm
- Completed: 8 VN's so far
-
Contact:
#2
Post
by SONTSE » Thu Jan 03, 2019 1:39 pm
Try adding 'hbox:' after 'for' line, like this:
Code: Select all
side "c r":
area (280,50,1000, 600)
viewport id "character screen":
mousewheel True
vbox:
for c in random_characters:
hbox:
showif c.gender == "male":
add "images/gender male.png" yalign 1
else:
add "images/gender female.png" yalign 1
text "{} {} from {}, {} years old. Trained for {} {}".format (c.name, c.surname, c.nationality, c.age, c.trainee, c.period)
vbar value YScrollValue("character screen")
Look! It's moving. It's alive. It's alive... IT'S ALIVE! Oh, in the name of God! Now I know what it feels like to be God!(@Henry_Frankenstein. Sums up my coding style)
-
ninjaK4T_06
- Newbie
- Posts: 6
- Joined: Fri Nov 30, 2018 6:19 am
-
Contact:
#3
Post
by ninjaK4T_06 » Fri Jan 04, 2019 1:10 am
Lena_Borodach wrote: ↑Thu Jan 03, 2019 1:39 pm
Try adding 'hbox:' after 'for' line, like this:
Code: Select all
side "c r":
area (280,50,1000, 600)
viewport id "character screen":
mousewheel True
vbox:
for c in random_characters:
hbox:
showif c.gender == "male":
add "images/gender male.png" yalign 1
else:
add "images/gender female.png" yalign 1
text "{} {} from {}, {} years old. Trained for {} {}".format (c.name, c.surname, c.nationality, c.age, c.trainee, c.period)
vbar value YScrollValue("character screen")
Wow I can't believe it was that easy to solve !

Thank you very much for your help ^_^
Users browsing this forum: Google [Bot]