How to move the namebox for certain characters?
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.
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.
How to move the namebox for certain characters?
I would like to move the namebox and change the background for certain characters. I've looked up several guides and the information seems to either be incorrect or outdated.
- KuroOneHalf
- Regular
- Posts: 129
- Joined: Fri Apr 25, 2014 6:18 pm
- Completed: Cuttlebone
- Projects: Somewhere In The Shade
- Deviantart: KuroOneHalf
- itch: kuroonehalf
- Contact:
Re: How to move the namebox for certain characters?
Inside the say screen you can identify what character is speaking and change what assets you display by doing something like this:
Alternatively, if you just want to change the textbox background, you can do something like this:
Code: Select all
define m = Character("Mary")
define j = Character("Jim")
screen say:
...
window:
id "window"
if who == "Mary":
background "mary_textbox.png"
elif who == "Jim":
background "jim_textbox.png"
...
Code: Select all
define m = Character("Mary", window_background="mary_textbox.png")
define j = Character("Jim", window_background="jim_textbox.png")
Re: How to move the namebox for certain characters?
With your help I managed to get what I wanted.
I use a variable to define if the game is in a cutscene or not and the say screen display different things based on this variable.
Anyway thanks for the help.
I use a variable to define if the game is in a cutscene or not and the say screen display different things based on this variable.
Code: Select all
screen say(who, what):
style_prefix "say"
window:
id "window"
if not cutscene:
background "gui/textbox.png"
text what id "what"
if who is not None:
window:
style "namebox"
text who id "who"
elif cutscene:
background "gui/textbox_cutscene.png"
text what id "what":
xpos 100
if who is not None:
window:
style "namebox2"
text who id "who"
Who is online
Users browsing this forum: Google [Bot]