Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
define doctor = Character('Rensont', color="#d3d3d3", ctc=anim.Blink("arrow.png"))
"{color=d3d3d3}?????{/color}" "Wait, don't move! "
"{color=d3d3d3}?????{/color}" "I saw you fall from across the street. That looked like a nasty bump on the head. "
"{color=d3d3d3}?????{/color}" "I'm Doctor Rensont. Let me take a look at you before you get up. "
doctor "You have the beginning of a big bump on your head, but other than that you seem to be ok. You can get up now. "
I do this for all the characters the player meets. It works as is, but the problem I'm running into is getting the ctc to work with the dialogue that starts with ?????. Each character has a different color associated with their name, so I didn't want to just create a new ????? character to get the ctc to work.
Any suggestions?
Thanks!
Last edited by webryder on Fri Feb 07, 2014 2:28 pm, edited 1 time in total.
define doctor = Character('[doctor]', color="#d3d3d3", ctc=anim.Blink("arrow.png"))
$ doctor = "?????"
doctor "Wait, don't move! "
doctor "I saw you fall from across the street. That looked like a nasty bump on the head. "
doctor "I'm Doctor Rensont. Let me take a look at you before you get up. "
$ doctor = "doctor"
doctor "You have the beginning of a big bump on your head, but other than that you seem to be ok. You can get up now. "
Something like this should be easier to use.
Last edited by philat on Fri Feb 07, 2014 12:48 pm, edited 1 time in total.
define doctor = Character('[doctor]', color="#d3d3d3", ctc=anim.Blink("arrow.png"))
$ doctor = "?????"
doctor "Wait, don't move! "
doctor "I saw you fall from across the street. That looked like a nasty bump on the head. "
doctor "I'm Doctor Rensont. Let me take a look at you before you get up. "
$ doctor = "doctor"
doctor "You have the beginning of a big bump on your head, but other than that you seem to be ok. You can get up now. "
Something like this should be easier to use.
Just tried this and it loses the color and ctc.
SundownKid wrote:Or define 2 characters and use the first one to represent the "hidden name" version.
I was hoping to not have to make duplicates of all my characters for one or two lines of dialogue...
Ah, sorry, didn't think through the details enough. The problem is that the character and the variable are both 'doctor'. Change one of them to something else (e.g. define doctor = Character('[dr]', color, ctc) ) and it should work.
define doctor = DynamicCharacter("doc_name", color="#d3d3d3", ctc=anim.Blink("arrow.png"))
$ doc_name = "?????"
#and then later I can change the name using
$ doc_name = "Rensont"
That let me keep the color and the ctc without putting in duplicate character lines.