[SOLVED] How to pause game while showing a 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
User avatar
oatnoodles
Regular
Posts: 47
Joined: Tue Aug 03, 2021 6:26 pm
Projects: Samuda Interval
Organization: Tomuwa Entertainment
Deviantart: oatnoodles
Github: oatnoodles
itch: oatnoodles
Discord: oatnoodles#0099
Contact:

[SOLVED] How to pause game while showing a screen

#1 Post by oatnoodles » Wed Oct 19, 2022 4:17 pm

Hi all, I've been searching for how to do this but couldn't find anything on Google.
I'd like to have everything pause while the player is on a screen. For example, when looking at the overworld map, the game will pause. Currently, the game just continues as normal, and shows dialogue/the next scene over the screen. I would like only what's on the screen menu to be interactable. Is this possible?
Last edited by oatnoodles on Wed Oct 19, 2022 4:32 pm, edited 1 time in total.
Ren'py amateur looking to learn as much as possible! Please be patient with me.

User avatar
_ticlock_
Veteran
Posts: 391
Joined: Mon Oct 26, 2020 5:41 pm
Contact:

Re: How to pause game while showing a screen

#2 Post by _ticlock_ » Wed Oct 19, 2022 4:25 pm

oatnoodles wrote:
Wed Oct 19, 2022 4:17 pm
Hi all, I've been searching for how to do this but couldn't find anything on Google.
I'd like to have everything pause while the player is on a screen. For example, when looking at the overworld map, the game will pause. Currently, the game just continues as normal, and shows dialogue/the next scene over the screen. I would like only what's on the screen menu to be interactable. Is this possible?
You need to call screen.

Code: Select all

screen test:
    textbutton _("Return") action Return()

label start:
    call screen test
    "This line appears only after you click the Return textbutton"

User avatar
oatnoodles
Regular
Posts: 47
Joined: Tue Aug 03, 2021 6:26 pm
Projects: Samuda Interval
Organization: Tomuwa Entertainment
Deviantart: oatnoodles
Github: oatnoodles
itch: oatnoodles
Discord: oatnoodles#0099
Contact:

Re: How to pause game while showing a screen

#3 Post by oatnoodles » Wed Oct 19, 2022 4:32 pm

Wow, I completely forgot about that function. Silly me. Thank you!
Ren'py amateur looking to learn as much as possible! Please be patient with me.

Post Reply

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot]