[Solved] RollForward action

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
thelastsecret
Regular
Posts: 117
Joined: Tue Mar 01, 2022 1:32 pm
Completed: The Last Secret
Projects: Sweet Science – The Girls from Silversee Castle
itch: thelastsecret
Discord: TheLastSecret #5266
Contact:

[Solved] RollForward action

#1 Post by thelastsecret »

I would like to add a screen with the RollForward action that basically allows to skip to the next say screen:

Code: Select all

screen manually_continue:
    textbutton "Continue!!!":
        action [RollForward()]
However, if that part of the game has not been played yet, rolling forward is disabled. Is there any way to force a roll forward nevertheless? Or to enable rolling forward or make a part of the story "played" already? (There is a variable to enable skipping, so maybe there is an analogue somewhere?)

Thank you in advance for your help!
Last edited by thelastsecret on Sat Dec 16, 2023 7:31 am, edited 1 time in total.

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

Re: RollForward action

#2 Post by Ocelot »

When you play the game, it constantly does little saves in certain points. You can then load those saves to restore game to some previous state. That what rollback does. If you want to load save "past" your current positin, it is rollforward. You cannot roll worward pas latest position because there is no save. Game does not know what the game state will be at that point, because you can literally do anything. It is like undo/redo function in editors. If you undo something in Photoshop, you can redo it again, but when you get to the latest version of your image, you cannot redo anymore.

If your goal is to dismiss a say statement, you just need to end current interaction. Which can be done with Return() action.
< < insert Rick Cook quote here > >

User avatar
thelastsecret
Regular
Posts: 117
Joined: Tue Mar 01, 2022 1:32 pm
Completed: The Last Secret
Projects: Sweet Science – The Girls from Silversee Castle
itch: thelastsecret
Discord: TheLastSecret #5266
Contact:

Re: RollForward action

#3 Post by thelastsecret »

Ocelot wrote: Wed Dec 13, 2023 4:23 pm When you play the game, it constantly does little saves in certain points. You can then load those saves to restore game to some previous state. That what rollback does. [...]
If your goal is to dismiss a say statement, you just need to end current interaction. Which can be done with Return() action.
Thank you for your explanation! Now I finally understand why RollForward() doesn't work.
Unfortunately, Return() also doesn't work: it just returns to the main menu, since I open the screen from the start label... So what would be the right action to just proceed to the next interaction? Or do I have to overwrite something of the say screen?
EDIT: Everything works, thank you very much!
Last edited by thelastsecret on Fri Dec 15, 2023 9:51 am, edited 1 time in total.

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

Re: RollForward action

#4 Post by Ocelot »

Did you try it? Return action is a misnomer, it does not have any relation to the return statement. It just ends current interaction and optionally sets the result of current interaction to some value.
< < insert Rick Cook quote here > >

User avatar
thelastsecret
Regular
Posts: 117
Joined: Tue Mar 01, 2022 1:32 pm
Completed: The Last Secret
Projects: Sweet Science – The Girls from Silversee Castle
itch: thelastsecret
Discord: TheLastSecret #5266
Contact:

Re: RollForward action

#5 Post by thelastsecret »

Ocelot wrote: Fri Dec 15, 2023 2:19 am Did you try it? Return action is a misnomer, it does not have any relation to the return statement. It just ends current interaction and optionally sets the result of current interaction to some value.
I did try it out and it didn't work, but... given your reply I have tried again – and this time it works!
I have no idea what I did wrong before, because in the meanwhile I've changed all kind of other things, but I must have had a stupid mistake somewhere. So thank you very much once more for your help!

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]