A few of my characters are meant to speak with a colored highlight to their text, like you could add to text in a Google Doc. How can I do this in Ren'Py? Preferably, I would like to know how to attach a string of code to the characters themselves that would add a highlight to everything they say automatically (like how you can assign the color of the character's name.) Thank you.
P.S. I'll also add that I'm not talking about outlining text, in case there's any confusion.
How can I add a visible highlight to dialogue text?
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.
-
- Newbie
- Posts: 1
- Joined: Sat Jul 14, 2018 2:48 pm
- Contact:
- MaydohMaydoh
- Regular
- Posts: 165
- Joined: Mon Jul 09, 2018 5:49 am
- Projects: Fuwa Fuwa Panic
- Tumblr: maydohmaydoh
- Location: The Satellite of Love
- Contact:
Re: How can I add a visible highlight to dialogue text?
Don't think there is a way to do it, but you could edit the say screen and put the "what" text into a frame which gets a background color from a dictionary.
You have to make sure the names in the dictionary are the same as the characters' names in Character.
Then you put the "what" text in the say screen inside a frame. The if statement then checks if the name is in the dictionary and if it is then it applies the background color relating to the dictionary entry to the frame. Then you can mess around with the frame's style to get it just right.
Of course it's not perfect as if you have more than one line and the line stops half way, you'll get empty space with the background color.
Code: Select all
define saycolors = { "Frank" : "#ff0000", "Sara" : "#00ff00" }
define frank = Character("Frank")
define sara = Character("Sara")
Code: Select all
frame xfill False:
if who in saycolors.keys():
background saycolors[who]
else:
background None
text what id "what"
Of course it's not perfect as if you have more than one line and the line stops half way, you'll get empty space with the background color.
Who is online
Users browsing this forum: Majestic-12 [Bot]