Can I return to a called screen from a label?

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
Rosiero
Newbie
Posts: 5
Joined: Thu Oct 19, 2017 2:42 pm
Contact:

Can I return to a called screen from a label?

#1 Post by Rosiero »

So I've got a "main screen" in the game from which the player can visit various places or call NPCs on the phone and whatnot. This is done using buttons with a Jump() action that jumps to the relevant label for that action.

However, sometimes after the conversation from the label is over, I want the game to simply return to the main screen--but obviously if the label has no code at the end of it telling it to do a specific thing, it will simply continue on to the next label in the script. Is there a way to specify that it should return to the already-called screen without executing anymore code?

EDIT: Since the screen(s) to "return" to are actually still on screen, I guess the question is less "can I return" and more "how do I make the main script simply stop executing like it did when I called the screen to begin with"...

philat
Eileen-Class Veteran
Posts: 1912
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: Can I return to a called screen from a label?

#2 Post by philat »

Just call the screen again.

Code: Select all

label start:
    call screen mapscreen # assuming this jumps to label1

label label1:
    "blah blah do stuff"
    call screen mapscreen

Post Reply

Who is online

Users browsing this forum: Ocelot, piinkpuddiin, snotwurm