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.
Hi
First question after registration since I can usually find the answer using google (and ending up on a post on here) but not this time. I hope I'm in the right sub-forum, please forgive me if I'm not and please point me to the right one
image hername = Text("Her name \nis [name]", style="sayText_b26_trf")
show hername
The style takes care of the positioning and all that and works with all image-text without variables (I'm placing text as image in speech bubbles)
I've tried declaring the variable default name="noname", I've tried combining text strings, you name it.
KeyError u'name'
I must be missing something incredibly basic and am, admittedly, very n00b. Any help appreciated.
The problem is the image is defined once taking the value of name at the time of definition and isn't updated. (Also possibly the order the variable being defined -- have you added a default name = None or something at the beginning?) I'd try ParameterizedText (https://www.renpy.org/doc/html/text.htm ... erizedText ).
default name = "None"
image hername = ParameterizedText(style="sayText_b26_trf")
label start:
show hername "Her name\nis [name]" #ETA because I realized it was longer than just the name. Works either way though.
Last edited by philat on Tue Apr 23, 2019 2:25 am, edited 2 times in total.
philat wrote: ↑Tue Apr 23, 2019 2:21 am
The problem is the image is defined once taking the value of name at the time of definition and isn't updated. (Also possibly the order the variable being defined -- have you added a default name = None or something at the beginning?) I'd try ParameterizedText (https://www.renpy.org/doc/html/text.htm ... erizedText ).
default name = "None"
image hername = ParameterizedText(style="sayText_b26_trf")
label start:
show hername "Her name\nis [name]" #ETA because I realized it was longer than just the name. Works either way though.