Is it possible to rollback past a pause?

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
ZetsuTheFirst
Newbie
Posts: 2
Joined: Wed Feb 21, 2024 8:37 am
Contact:

Is it possible to rollback past a pause?

#1 Post by ZetsuTheFirst »

I’ve scoured previous forums and posts, but haven’t been able to find an answer for this one.

What I’d to be able to have is:

* Line of dialogue (Screen 1)
* Display full screen without windows/text boxes, and have it display until the player clicks (Screen 2)
* Display a different full screen without windows/text boxes, and have it display until the player clicks (Screen 3)
* Line of dialogue (Screen 4).

And then, have it possible for the player to rollback from Screen 4 to Screen 3, then from Screen 3 to Screen 2, and from Screen 2 to Screen 1

I can rollback from Screen 4 to Screen 3. I’m a pretty novice coder, but adding the following seemed to fix that(?):

config.pause_after_rollback = True

However, no matter what I do, I can’t seem to rollback from a pause screen. I can’t go back from Screen 3 to 2, or 2 to 1.

Any help would be much appreciated - if there’s a workaround that would achieve the same effect, that would be awesome too.

jeffster
Miko-Class Veteran
Posts: 504
Joined: Wed Feb 03, 2021 9:55 pm
Contact:

Re: Is it possible to rollback past a pause?

#2 Post by jeffster »

This works with roll back & forward:

Code: Select all

label start:
    scene first
    "Line 1"
    scene second
    pause
    scene third
    pause
    scene fourth
    "Line 2"
If the problem is solved, please edit the original post and add [SOLVED] to the title. 8)

ZetsuTheFirst
Newbie
Posts: 2
Joined: Wed Feb 21, 2024 8:37 am
Contact:

Re: Is it possible to rollback past a pause?

#3 Post by ZetsuTheFirst »

jeffster wrote: Wed Feb 21, 2024 10:54 am This works with roll back & forward:

Code: Select all

label start:
    scene first
    "Line 1"
    scene second
    pause
    scene third
    pause
    scene fourth
    "Line 2"
Thanks so much for the reply!

So, out of concern it might have been something in the way I was coding things, I tried copying what you posted in verbatim, just to see what would happen.

Unfortunately, the same thing happened:

Image


On the paused screen, there is no 'back' button available. This is not the case on non-paused screens, where the buttons are all visible:

Image

I'm not sure if I've just ticked a box somewhere that's making this happen, or are making some other silly mistake.

jeffster
Miko-Class Veteran
Posts: 504
Joined: Wed Feb 03, 2021 9:55 pm
Contact:

Re: Is it possible to rollback past a pause?

#4 Post by jeffster »

Yes, there is probably some problem with your code.
In scene "fourth" I would expect only "Line 2", without "Line 1".
Or is that NVL mode?
I think if you create a new project with the code I posted, it should work. (Not in NVL mode).
And when you roll back, the Quick Menu should be visible...

It might make sense to post the code that you are working on.
(Posting scripts, use \[code\] tags (without backslashes), or select the text and click button that looks like </>).
If the problem is solved, please edit the original post and add [SOLVED] to the title. 8)

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2435
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Is it possible to rollback past a pause?

#5 Post by Ocelot »

Does rollback with mousewheel works?
If so, you just have say screen hidden. IIRC pause statement might hide it.
< < insert Rick Cook quote here > >

jeffster
Miko-Class Veteran
Posts: 504
Joined: Wed Feb 03, 2021 9:55 pm
Contact:

Re: Is it possible to rollback past a pause?

#6 Post by jeffster »

Oh, right. Pause hides the Quick Menu. But mouse wheel and Page Up should work.
If the problem is solved, please edit the original post and add [SOLVED] to the title. 8)

User avatar
m_from_space
Eileen-Class Veteran
Posts: 1030
Joined: Sun Feb 21, 2021 3:36 am
Contact:

Re: Is it possible to rollback past a pause?

#7 Post by m_from_space »

ZetsuTheFirst wrote: Wed Feb 21, 2024 8:40 am What I’d to be able to have is:

* Line of dialogue (Screen 1)
* Display full screen without windows/text boxes, and have it display until the player clicks (Screen 2)
* Display a different full screen without windows/text boxes, and have it display until the player clicks (Screen 3)
* Line of dialogue (Screen 4).
You cannot display normal Renpy dialogue in your own screens (not the easy way at least). Dialogue is always displayed inside the "say" screen that's part of <screens.rpy>. If you're talking about some custom screens that are showing text, that's not dialogue. But maybe you're talking about showing a screen and while doing that, also show some dialogue text. On the other hand, your screenshots say a different story.

Screens are UI elements, so it's a bit weird to ask if you can rollback "before a screen". What you mean is probably, if you can rollback and undo showing the screen in the first place. And yes, that is possible.

Code: Select all

screen scr1():
    text "Screen 1"

screen scr2():
    text "Screen 2"

label start:
    "Game start..."
    show screen scr1
    pause
    show screen scr2
    pause
    "Both screens are visible."
    "You can rollback and they will hide again."
    return

Post Reply

Who is online

Users browsing this forum: Amazon [Bot], elcharlo, Google [Bot], Roxie