I want to have different text colors for character situations. For example, character MC has standard text and colors when talking, but when they are thinking, I would like to have different colors and italics. I can obviously do it inline, but I would like to not have to enter all of that info each time.
I started by thinking I could have different variable for each character. For example, MC would have standard text and colors, but MCT would have a different color and characteristics.
Currently, I am thinking I could use a style, but I have been struggling with that as well.
Any suggestions?
Colors for Individual 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.
- Ocelot
- Lemma-Class Veteran
- Posts: 2384
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: Colors for Individual Characters
Code: Select all
# You can supply style properties to the name (with 'who_' prefix)
# and to text itself (with 'what_' prefix)
define C1 = Character("Character2", who_color="#F00", what_color="#F55")
define C2 = Character("Character2", who_color="#0F0", what_color="#5F5")
# You can define function returning new character objects if you need to apply
# uniform modification to all characters
init python:
def think(char):
return Character(kind=char, what_italic=True)
label start:
C1 "Hello"
C2 "Hello"
think(C1) "I do not like him"
return
< < insert Rick Cook quote here > >
Re: Colors for Individual Characters
Perfect! Thanks!
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot]