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.
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
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.
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")
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 ^_^