How to prevent players from going back
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.
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.
How to prevent players from going back
I wasn't sure how to do a search if this was asked already.
Is there a code to prevent users from using arrow keys to go back in the dialogue?
Or to have a scene only been once.
Thanks
Is there a code to prevent users from using arrow keys to go back in the dialogue?
Or to have a scene only been once.
Thanks
- luminarious
- Veteran
- Posts: 353
- Joined: Thu May 01, 2008 1:12 pm
- Projects: Winter, winter
- Location: Estonia
- Contact:
Re: How to prevent players from going back
Please don't do this. Thank You!
-- a player.
-- a player.
- Lotus
- Veteran
- Posts: 298
- Joined: Thu Jan 06, 2011 9:28 am
- Projects: Unnamed Slenderman VN, Secret 10560
- Location: USA
- Contact:
Re: How to prevent players from going back
I lol'ed. You could always make a save for that spot in the game if you're paranoid of messing up.luminarious wrote:Please don't do this. Thank You!
-- a player.
Does this thread help any? c: http://lemmasoft.renai.us/forums/viewto ... ck#p112729 I just tried it with my game and it works for me.Sakura02 wrote:I wasn't sure how to do a search if this was asked already.
Is there a code to prevent users from using arrow keys to go back in the dialogue?
Or to have a scene only been once.
Thanks
I added
Code: Select all
config.hard_rollback_limit = 0- papillon
- Arbiter of the Internets
- Posts: 4104
- Joined: Tue Aug 26, 2003 4:37 am
- Completed: lots; see website!
- Projects: something mysterious involving yuri, usually
- Organization: Hanako Games
- Tumblr: hanakogames
- Contact:
Re: How to prevent players from going back
It's a common ongoing argument, you can find tons of threads on the subject, where authors want to stop people rolling back in order to preserve the purity of something or other, and players are rather annoyed about it.
Rolling back isn't just about wanting to change your mind and make a different choice, it's also about "oops, I accidentally double-clicked". It also tends to irritate people that you're intentionally taking features away that they want to use, because you don't want to use them.
There are times where it makes sense, but expect a lot of grumpypants.
Rolling back isn't just about wanting to change your mind and make a different choice, it's also about "oops, I accidentally double-clicked". It also tends to irritate people that you're intentionally taking features away that they want to use, because you don't want to use them.
There are times where it makes sense, but expect a lot of grumpypants.
- Greeny
- Miko-Class Veteran
- Posts: 921
- Joined: Sun Dec 20, 2009 10:15 am
- Completed: The Loop, The Madness
- Projects: In Orbit, TBA
- Organization: Gliese Productions
- Location: Cantankerous Castle
- Contact:
Re: How to prevent players from going back
It's not "taking a feature away" so much as "not putting the feature in in the first place", in my opinion.
In Orbit [WIP] | Gliese is now doing weekly erratic VN reviews! The latest: Halloween Otome!
Gliese Productions | Facebook | Twitter

Gliese Productions | Facebook | Twitter

- Anima
- Veteran
- Posts: 448
- Joined: Wed Nov 18, 2009 11:17 am
- Completed: Loren
- Projects: PS2
- Location: Germany
- Contact:
Re: How to prevent players from going back
That's not really possible, since it's a standard Ren'Py feature.
Avatar created with this deviation by Crysa
Currently working on:
Currently working on:
- Winterwolves "Planet Stronghold 2" - RPG Framework: Phase III
- SleepKirby
- Veteran
- Posts: 255
- Joined: Mon Aug 09, 2010 10:02 pm
- Projects: Eastern Starlight Romance, Touhou Mecha
- Organization: Dai-Sukima Dan
- Location: California, USA
- Contact:
Re: How to prevent players from going back
A few possibilities:
(1) Disables rollback completely, so that the player can't go back to previous dialogue at all. This gets the same effect as setting config.hard_rollback_limit to 0 (as suggested earlier), though un-enabling rollback like this might be more intuitive.
(2) If you only want to disable rolling back past specific points in your game script, then you can use at each of those points.
(3) Slightly trickier, but you can do something like automatically disabling rollback after in-game choice menus. If your choice menus are handled by your own custom choice screen, then you can add renpy.block_rollback() to that screen's code. (I haven't tried it myself though, so I don't know the exact details. I know you can also do this without screen language by overriding Ren'Py's default menu handler with your own; it's a hack that should still work now, but it may or may not work in future Ren'Py versions.)
Another trickier thing to try: there's an alternative to rollback, called readback, which lets the player read previous dialogue, but doesn't allow them to "go back in time" in the game. The readback implementation I'm linking here isn't officially supported by the current version of Ren'Py; it was written by forum member delta. But it worked for me after a couple of tweaks or so.
(1)
Code: Select all
config.rollback_enabled = False(2) If you only want to disable rolling back past specific points in your game script, then you can use
Code: Select all
$ renpy.block_rollback()(3) Slightly trickier, but you can do something like automatically disabling rollback after in-game choice menus. If your choice menus are handled by your own custom choice screen, then you can add renpy.block_rollback() to that screen's code. (I haven't tried it myself though, so I don't know the exact details. I know you can also do this without screen language by overriding Ren'Py's default menu handler with your own; it's a hack that should still work now, but it may or may not work in future Ren'Py versions.)
Another trickier thing to try: there's an alternative to rollback, called readback, which lets the player read previous dialogue, but doesn't allow them to "go back in time" in the game. The readback implementation I'm linking here isn't officially supported by the current version of Ren'Py; it was written by forum member delta. But it worked for me after a couple of tweaks or so.
Re: How to prevent players from going back
Lol thanks Sleep Kirby. For the people freaking out, it's ok I'm not going to do it for the entire game. It's for a mini game I'm making where you can only see the animation once and then remember what was on it.
Now for the
What do I need to put in the brackets in order to toggle it off and on?
Now for the
Code: Select all
$ renpy.block_rollback()- Aleema
- Lemma-Class Veteran
- Posts: 2677
- Joined: Fri May 23, 2008 2:11 pm
- Organization: happyB
- Tumblr: happybackwards
- Contact:
Re: How to prevent players from going back
You don't put anything in the brackets. Block Rollback prevents the player from rolling back any further than that line. It won't turn off rollback. I suggest you put it after the animation shows.
Who is online
Users browsing this forum: Google [Bot]

