How can I set a transition with renpy.hide_screen?

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.
Post Reply
Message
Author
Thailandian
Regular
Posts: 30
Joined: Tue Jun 01, 2021 6:24 am
Contact:

How can I set a transition with renpy.hide_screen?

#1 Post by Thailandian »

This should be easy but I couldn't find it in the documentation.

With either the hide screen statement or the Hide action, you can set a transition. However, I can't find an equivalent for renpy.hide_screen

As always, any suggestions or information would be most appreciated.

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: How can I set a transition with renpy.hide_screen?

#2 Post by Remix »

Try

renpy.with_statement( transition_name )

just after the hide_screen

Transient screens might not work though (choice etc)
Frameworks & Scriptlets:

Thailandian
Regular
Posts: 30
Joined: Tue Jun 01, 2021 6:24 am
Contact:

Re: How can I set a transition with renpy.hide_screen?

#3 Post by Thailandian »

Thanks Remix. However, that gave the error:
"Exception: Cannot start an interaction in the middle of an interaction, without creating a new context."
I tried inserting: "renpy.restart_interaction()" before or after these 2 lines but that didn't seem to help either.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Ocelot, VESTED