Page 1 of 1

Displaing preference variables

Posted: Thu Aug 31, 2017 9:57 am
by Lutka
So the default bar you drag to change the text speed is quite bare bones, I was thinking would it be possible to display the text speed variable as a number next to the bar?
For the life of me I can't figure out what the variable would even be called, let alone how to call it in to text. Where are these variable names even defined?

Re: Displaing preference variables

Posted: Thu Aug 31, 2017 10:25 am
by DannyGMaster
They're defined in every project in a file called options.rpy. For the text speed specifically it can be found around line 116:

Code: Select all

default preferences.text_cps = 0
To convert it into text, you would place that name in a string, and within square brackets:

Code: Select all

text "[preferences.text_cps]"

Re: Displaing preference variables

Posted: Thu Aug 31, 2017 10:37 am
by Lutka
Thanks for the quick reply, that worked :)