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.
Completed: Eight Sweets, The Heart of Tales, [redacted] Life, Must Love Jaws, A Tune at the End of the World, Three Guys That Paint, The Journey of Ignorance, Portal 2.5.
screen tooltip_example():
vbox:
textbutton "North":
action Return("n")
tooltip "To meet a polar bear."
textbutton "South":
action Return("s")
tooltip "All the way to the tropics."
textbutton "East":
action Return("e")
tooltip "So we can embrace the dawn."
textbutton "West":
action Return("w")
tooltip "Where to go to see the best sunsets."
$ tooltip = GetTooltip()
if tooltip:
text "[tooltip]"
However, when I try to open the game, I get this message:
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.
File "game/screens.rpy", line 1486: u'tooltip' is not a keyword argument or valid child for the textbutton statement.
tooltip "To meet a polar bear."
^
Ren'Py Version: Ren'Py 6.99.13.2919
I'm trying to create an example tooltip display just to test out what it looks like. I've never made one before, and have never seen in-game screenshots of what Ren'Py tooltips look like, so I don't know how this tooltip tutorial manifests in a Ren'Py game.
Last edited by Katy133 on Sun Mar 04, 2018 2:51 pm, edited 1 time in total.
Completed: Eight Sweets, The Heart of Tales, [redacted] Life, Must Love Jaws, A Tune at the End of the World, Three Guys That Paint, The Journey of Ignorance, Portal 2.5.
philat wrote: ↑Sat Mar 03, 2018 11:47 pm
I would expect you don't have the latest update. That's a very recent addition to renpy.
Thank you! Updating Ren'Py worked.
For those interested in the updated Tooltip feature, you'll also need to add a button/route to display the screen. I used a Quick Menu button for this example.
Basically, when you press the Tooltip Quick Menu button, the different textbuttons ("North," "South," "East," "West"). Mousing over them shows the tooltip text ("To meet a polar bear," etc), and clicking a textbutton performs the action (Return).