- Apr 19, 2018
- 705
- 1,654
To get some practice with RenPy and Python I created a small game to place a image on the screen so the user can click it to get to a character screen. Everything works fine with the menu, my issue is I would like to hide the dialogue box of the game to give it a cleaner look. I can't figure out how to hide it and bring it back without the game causing an error.
I can't use window show/hide because the menu pops up on an action statement.
I've tried using Hide("say"), which works to hide the dialogue box when the character screen is displayed. Left with only this command when the user exits out of the menu they can click to get the dialogue box back but the dialog has advanced one line. I would like it to stay at the same line as when the user left.
If I use Show("say") in conjunction with the Hide statement the game errors out. "Exception: Required parameter who has no value." I'm assuming it's dumping the dialogue when it hides the dialogue box causing this error when I try to show it again.
Most of the code I lifted from another game and modified so that I could use it, and also the pictures, this is me just practicing and learning and I can't figure out how to make this work. I've went through the forum, searched online, the tutorial that comes with the RenPy engine, and the docs that come with it and can't find a solution.
Code to call the character screen:
Code to return to the game:
Any help will be appreciated.
I can't use window show/hide because the menu pops up on an action statement.
I've tried using Hide("say"), which works to hide the dialogue box when the character screen is displayed. Left with only this command when the user exits out of the menu they can click to get the dialogue box back but the dialog has advanced one line. I would like it to stay at the same line as when the user left.
If I use Show("say") in conjunction with the Hide statement the game errors out. "Exception: Required parameter who has no value." I'm assuming it's dumping the dialogue when it hides the dialogue box causing this error when I try to show it again.
Most of the code I lifted from another game and modified so that I could use it, and also the pictures, this is me just practicing and learning and I can't figure out how to make this work. I've went through the forum, searched online, the tutorial that comes with the RenPy engine, and the docs that come with it and can't find a solution.
Code to call the character screen:
Code:
screen topRightMenu tag topRightMenu: # Chracter Menu
modal False # Makes the background game interactable
imagebutton:
idle "phone_idle" hover "phone_hover" xalign 0.98 yalign 0.01 action [Show("char_screen"),renpy.restart_interaction]
# imagebutton in upper right corner - when clicked upon opens char_screen for stats
Code:
frame: # Hides the character screen and will save the name input for the main character
style_group "menu_choice"
xalign 0.5
yalign 0.97
has hbox
textbutton "Return" action Hide("char_screen"),