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.
-
Smaymay
- Regular
- Posts: 70
- Joined: Fri Jul 01, 2016 11:35 am
- Completed: Vicboys demo
- Tumblr: esmmeh
- Deviantart: Smaymay
- Location: The Netherlands
-
Contact:
#1
Post
by Smaymay » Sat Mar 11, 2017 5:25 pm
I wonder if it would be possible to switch between two different nameboxes with two different positions relative to the textbox. My character sprites will only show up at two fixed positions. Left and right. I thought it would be nice to switch the position of the nameboxes to left or right depending who's talking. I'm still getting used to the new GUI interface so I don't know where to start. hehe...
Right now my character name tags are defined like this:
Code: Select all
define wr = Character("Waldo")
define n = Character(None)
I haven't changed anything yet to the default options.rpy, screens.rpy and gui.rpy files.
~ Thanks!

Last edited by
Smaymay on Fri Mar 17, 2017 2:14 pm, edited 1 time in total.
-
indoneko
- Miko-Class Veteran
- Posts: 528
- Joined: Sat Sep 03, 2016 4:00 am
-
Contact:
#2
Post
by indoneko » Sat Mar 11, 2017 5:47 pm
You can change the name position by using
who_xpos=n where n is the new x-axis position
Code: Select all
define wl = Character("Waldo", who_xpos=10)
define mm = Character("Maymay", who_xpos=600)
define n = Character(None)
-
Smaymay
- Regular
- Posts: 70
- Joined: Fri Jul 01, 2016 11:35 am
- Completed: Vicboys demo
- Tumblr: esmmeh
- Deviantart: Smaymay
- Location: The Netherlands
-
Contact:
#3
Post
by Smaymay » Sat Mar 11, 2017 6:19 pm
@indoneko Thank you for your fast reply!
I tried it out. It switched the names!
But not the nameboxes.
I also looked at
this tutorial and tried
window_xpos
instead of
who_xpos
and it DID change the position of my namebox! But also the position of my dialoguebox XD So it's probably a child I guess. Not the effect I was looking for either.
-
Smaymay
- Regular
- Posts: 70
- Joined: Fri Jul 01, 2016 11:35 am
- Completed: Vicboys demo
- Tumblr: esmmeh
- Deviantart: Smaymay
- Location: The Netherlands
-
Contact:
#4
Post
by Smaymay » Fri Mar 17, 2017 2:14 pm
I ended up making two different dialogue box images.
- - Dialogue box with name box at left
- - Dialogue box with name box at right
And defined the names for my characters separately.
Code: Select all
define wrl = Character('Waldo', who_xpos=546, window_background="gui/textbox_left.png")
define wrr = Character('Waldo', who_xpos=1755, window_background="gui/textbox_right.png")
It's probably bad practice to code it like this. But hey it works.
