I have created custom names for characters & some hovers with the displayText.
hovered Show("displayTextScreen", displayText = "[m1_name]")
If I do this as shown above, it displays the name literally. [m1_name]
If I remove the quotes & brackets, it works.
However, it fails when using multiple words as well as 's.
hovered Show("displayTextScreen", displayText = m1_name's Car)
I have tried multiple things & I just can't get it to work.
If you can help, I would appreciate it.
Thank you for your time.
Help With Hover displayText & Custom Char Names
Forum rules
Questions about Ren'Py should go in the Ren'Py Questions and Announcements forum.
Questions about Ren'Py should go in the Ren'Py Questions and Announcements forum.
Re: Help With Hover displayText & Custom Char Names
"[m1_name]" - this is the Ren'Py-style data interpolation.
https://www.renpy.org/doc/html/text.htm ... ating-data
But in your case the python-style text formatting is required, so try it like
Code: Select all
# m1_name is the variable, so it doesn't need quotes
Show("displayTextScreen", displayText = m1_name)
Show("displayTextScreen", displayText = "{} - {}".format(m1_name, m2_name) )
Show("displayTextScreen", displayText = "{}'s Car".format(m1_name) )
Show("displayTextScreen", displayText = '{}\'s Car'.format(m1_name) )
https://www.renpy.org/doc/html/text.htm ... characters
Re: Help With Hover displayText & Custom Char Names
Alex
Thank you so much for answering my question. I never learned to code, only pick up bits & pieces here & there until I get some sort of Frankenstein of what I want to work, ha ha.
I used this one here:
I was dismayed when it came back with an error.
Well, that's because I wondered if it should look like this:
I tried it straight, the way you showed, & it worked!
Thanks again. Take care.
Thank you so much for answering my question. I never learned to code, only pick up bits & pieces here & there until I get some sort of Frankenstein of what I want to work, ha ha.
I used this one here:
Code: Select all
Show("displayTextScreen", displayText = "{}'s Car".format(m1_name) )
Well, that's because I wondered if it should look like this:
Code: Select all
Show("displayTextScreen", displayText = "{m1_name}'s Car".format(m1_name) )
Thanks again. Take care.
Who is online
Users browsing this forum: No registered users