Hey all. Another annoying question here.
Im trying to set the color of some text based on the value of a variable but the various permutations of this that i have tried throw exceptions
basically i want to set a variable elsewhere in the code which will allow me to use text color flag i.e
$ textColorVar = "#ffaa00"
text "{color = textColorVar} Text n stuff {/color}"
for clarity i have already tried the above and it doesn't work. it says that color string must be 3,4, 6 or 8 characters long
Hex variable and color
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: 2402
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: Hex variable and color
Use string substitution to insert your string into text: text "{color=[textColorVar]} Text n stuff {/color}"
< < insert Rick Cook quote here > >
Re: Hex variable and color
Thanks Ill give that a try
Who is online
Users browsing this forum: Bing [Bot], Google [Bot], Majestic-12 [Bot]