[Solved] Blocking rollback not working properly.

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
simba975
Newbie
Posts: 22
Joined: Sun Jul 23, 2023 12:05 pm
Contact:

[Solved] Blocking rollback not working properly.

#1 Post by simba975 »

So, I want to people to not be able to rollback after making a decision, for which I'm using this command in the first line of the label that the menu redirects to: $ renpy.block_rollback()

The problem is that this not only prevents you from rolling back to the options menu, but also prevents from rolling back to the first line of dialogue, any way to fix?

Edit: apparently it was solved in a new version of Ren'Py.
Last edited by simba975 on Fri Oct 27, 2023 7:20 pm, edited 1 time in total.

User avatar
_ticlock_
Miko-Class Veteran
Posts: 910
Joined: Mon Oct 26, 2020 5:41 pm
Contact:

Re: Blocking rollback not working properly.

#2 Post by _ticlock_ »

simba975 wrote: Wed Sep 06, 2023 5:20 pm So, I want to people to not be able to rollback after making a decision, for which I'm using this command in the first line of the label that the menu redirects to: $ renpy.block_rollback()

The problem is that this not only prevents you from rolling back to the options menu, but also prevents from rolling back to the first line of dialogue, any way to fix?
Possibly you want to use renpy.fix_rollback().

If not, can you provide a piece of code that does not work correctly?
The following works as intended:

Code: Select all

    "You can NOT rollback to this line."
    $ renpy.block_rollback()
    "You can rollback to this line."

User avatar
simba975
Newbie
Posts: 22
Joined: Sun Jul 23, 2023 12:05 pm
Contact:

Re: Blocking rollback not working properly.

#3 Post by simba975 »

Trying it again today I discovered that normally it works fine, the problem previously mentioned only happens if you press the rollback key while the first dialogue after $ renpy.block_rollback() while it is being displayed (while cps is making the letters appear), which is extremely strange. Any suggestions of why this may happen?

Here is part of my code for reference:

Code: Select all

	menu:
		"Dont you fear dark?"if notGreatStart2 == True:
                	$ notGreatStart2 = False
                	$ notGreatStart3 = True
                	$ notGreatStart4 = True
                	jump dontYouFear
                	
    label dontYouFear:
        $ renpy.block_rollback()
        show e weo
        "Not really."
        show e wec
        "Not anymore..."
In this case if I press b (rollback key) while "Not really" is being displayed, when i get to "Not anymore..." I cant rollback to "Not really" again.

User avatar
_ticlock_
Miko-Class Veteran
Posts: 910
Joined: Mon Oct 26, 2020 5:41 pm
Contact:

Re: Blocking rollback not working properly.

#4 Post by _ticlock_ »

simba975 wrote: Thu Sep 07, 2023 8:33 pm Trying it again today I discovered that normally it works fine, the problem previously mentioned only happens if you press the rollback key while the first dialogue after $ renpy.block_rollback() while it is being displayed (while cps is making the letters appear), which is extremely strange. Any suggestions of why this may happen?

In this case if I press b (rollback key) while "Not really" is being displayed, when i get to "Not anymore..." I cant rollback to "Not really" again.
I see. It is not directly related to $ renpy.block_rollback(). It only happens if you try to rollback during the first line. I opened an issue on github.

Post Reply

Who is online

Users browsing this forum: Ocelot, pockatuck