I have a task-list screen that I want to open, both from a button and from within the script. As well as opening the screen and hiding the button, there will be other house-keeping to do, so I decided it would be better to write a Python function for the routine. Here is the relevant code:
Code: Select all
init python:
def openToDo():
renpy.hide_screen("to_do_list_button")
renpy.show_screen("game_ch01_tasks")
renpy.restart_interaction()
That works as expected, but I would like to add a transition. According to the documentation, the python equivalent to "with dissolve" is:
Code: Select all
renpy.with_statement(trans=dissolve)
but I can't find any simple examples of how or where to place that code. I tried both before and after the renpy.show_screen statements, but got an error message: Exception: Cannot start an interaction in the middle of an interaction without creating a new context.
I sort of understand that, but then where should the code go?