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.
textbutton "FIGHT" text_style "fight_button" action [SetVariable("fight", True)] at my_shake, fade_in2
textbutton "FLIGHT" text_style "flight_button" action [SetVariable("flight", True)] at my_shake, fade_in3
They both show up fine, but the problem occurs when I hover over the button, it doesn't select the proper area. At the pos specified, the textbutton is not selected. But when I hover my mouse at the top left of the screen, the "FLIGHT" button is selected. I tried playing around with the pos, action, and text but it remains the same. The button is not recognized in the correct area.
What am I doing wrong?
Thanks in advance!
Last edited by redeller on Mon Aug 22, 2022 10:40 pm, edited 1 time in total.
## Place this somewhere in screens.rpy, or outside any label.
screen fight():
vbox:
textbutton "myButton" action NullAction()
## The rest goes in script.rpy
label start:
"This is one of many correct ways to show a textbutton."
show screen fight
"the button should now show"
return
There are many more ways top show the button and control how it behaves, all depends what exactly you want to achieve, for example, you may want to call the screen instead or might want to call the screen with keyword arguments so the position of the button can be changed dynamically etc.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.