I'm having some trouble with changing characters' names and text color.
Long ago in a distant land, I, SelLi-
asked about how to change a character's name, and I was helped out by being given this useful code.
Code: Select all
init python:
def dCharacter(name_expr, **properties):
return Character(name_expr, dynamic=True, ctc_position="fixed", what_prefix='"', what_suffix='"', **properties)
Code: Select all
$DylanName=Stranger
Dylan=dCharacter(DylanName, color="#89", what_color="#89")
#later~
Sammy"Who ARE you?"
$DylanName=Dylan
Dylan"My name is Dylan."
The reason I want to learn this is for situations where someone is under cover or something similar.
When Bob is undercover as Joe and he talks to Sammy, they have quite a lengthy dialogue, with his name being displayed as Joe and his who/what text color being displayed as Joe's colors.
But according to Sammy's choices earlier on, Bob may have the exact same lengthy dialogue with Sammy without Bob being undercover. So his name would be displayed as Bob, and his who/what text would be in Bob's colors.
I'd like to have Bob's name and colors change without making a separate character, since I don't want to have the same lengthy dialogue twice, just with "Joe" replacing "Bob" at the beginning of Bob's lines.
I tried:
Code: Select all
init python:
def dCharacter(name_expr, **properties):
return Character(name_expr, dynamic=True, ctc_position="fixed", what_prefix='"', what_suffix='"', **properties)
joe=dCharacter("Joe", color="#25", what_color="#25")
bob=dCharacter("Bob", color="#50", what_color="#50")
b=joe
What am I doing wrongly? Can I please get some help?