config.default_afm_after_click

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
ReAnimator
Regular
Posts: 64
Joined: Mon Dec 16, 2013 1:00 pm
Contact:

config.default_afm_after_click

#1 Post by ReAnimator » Fri Aug 19, 2022 3:32 pm

It seems it's missing?
I can use preferences.afm_after_click without problems but is it not supposed to be in config variables?

User avatar
PyTom
Ren'Py Creator
Posts: 15892
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: config.default_afm_after_click

#2 Post by PyTom » Fri Aug 19, 2022 4:04 pm

Nowadays, you can do

Code: Select all

default preferences.afm_after_click = True 
so there's no needs for new config.default_ variables for preferences.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

ReAnimator
Regular
Posts: 64
Joined: Mon Dec 16, 2013 1:00 pm
Contact:

Re: config.default_afm_after_click

#3 Post by ReAnimator » Fri Aug 19, 2022 5:45 pm

Thanks, PyTom!
I wasn't sure which one I should use!

One more question regarding preferences.voice_sustain.

Code: Select all

default preferences.voice_sustain = True
When I load the game after deleting persistent data, this works as expected. It makes voice sustain on.
But if I change this to

Code: Select all

init python:
	preferences.voice_sustain = True
It stays off when I load the game after deleting persistent data. After I reload the game then it's set properly.
The other preferences variables seem to work fine.

ReAnimator
Regular
Posts: 64
Joined: Mon Dec 16, 2013 1:00 pm
Contact:

Re: config.default_afm_after_click

#4 Post by ReAnimator » Fri Aug 19, 2022 11:48 pm

I thought both 'default' and 'init python:' work in a similar manner but... probably they don't. I need to use 'default' specifically for it.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Nightmarecool2