An aaction that activates or deactivates auto-forward

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
abeplaga
Regular
Posts: 35
Joined: Mon Oct 15, 2018 10:09 am
Contact:

An aaction that activates or deactivates auto-forward

#1 Post by abeplaga » Wed Jan 19, 2022 11:30 am

Hi, I see that there's a value called preferences.afm_enable that activates auto-forward (https://www.renpy.org/doc/html/preferences.html).

I would like to deactivate the auto-forward (if the player has previously activated it) when entering a screen, but I can't get it.

I have tried this with some variations but it gives me error.

Code: Select all

action Preference("afm_enable", "False")
I have set "preferences.afm_enable", I have removed the " " around the False value.... but nothing...

I have seen in old threads that there is a similar action...

Code: Select all

action Preference("auto-forward", "toggle")
but what it does is to change to the opposite value and I would like the value to be changed to False.

Can anyone help me? Thanks!

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

Re: An aaction that activates or deactivates auto-forward

#2 Post by Ocelot » Wed Jan 19, 2022 11:52 am

A good start would be to read documentation on Preference() action and see which preference names and values can be used.
< < insert Rick Cook quote here > >

User avatar
plastiekk
Regular
Posts: 40
Joined: Wed Sep 29, 2021 4:08 am
Discord: plastiekk#3072
Contact:

Re: An aaction that activates or deactivates auto-forward

#3 Post by plastiekk » Wed Jan 19, 2022 12:50 pm

abeplaga wrote:
Wed Jan 19, 2022 11:30 am
Hi, I see that there's a value called preferences.afm_enable that activates auto-forward (https://www.renpy.org/doc/html/preferences.html).

I would like to deactivate the auto-forward (if the player has previously activated it) when entering a screen, but I can't get it.

I have tried this with some variations but it gives me error.

Code: Select all

action Preference("afm_enable", "False")
I have set "preferences.afm_enable", I have removed the " " around the False value.... but nothing...

I have seen in old threads that there is a similar action...

Code: Select all

action Preference("auto-forward", "toggle")
but what it does is to change to the opposite value and I would like the value to be changed to False.

Can anyone help me? Thanks!
Try:

Code: Select all

$ config.allow_skipping = False
in your script to deactivate skipping and the opposite

Code: Select all

$ config.allow_skipping = True 
to allow it.

Or study the manual, like Ocelot said.


Edit: Forget the above, i copied/pasted the wrong line, haha.

its:
$ preferences.afm_enable True/False of course.
Your action should look like this:

Code: Select all

action ToggleVariable('preferences.afm_enable', True, False)
Why on earth did I put the bread in the fridge?

User avatar
plastiekk
Regular
Posts: 40
Joined: Wed Sep 29, 2021 4:08 am
Discord: plastiekk#3072
Contact:

Re: An aaction that activates or deactivates auto-forward

#4 Post by plastiekk » Thu Jan 20, 2022 9:47 am

abeplaga wrote:
Wed Jan 19, 2022 11:30 am
Can anyone help me? Thanks!
Edited my post above.
Why on earth did I put the bread in the fridge?

strayerror
Regular
Posts: 154
Joined: Fri Jan 04, 2019 3:44 pm
Contact:

Re: An aaction that activates or deactivates auto-forward

#5 Post by strayerror » Fri Jan 21, 2022 7:49 pm

Think this is the one you're looking for:

Code: Select all

Preference("auto-forward", "disable")
src: https://www.renpy.org/doc/html/screen_a ... Preference

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]