[Solved] Checking user's cps option

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
kostek00
Regular
Posts: 131
Joined: Wed Mar 28, 2018 5:54 pm
Contact:

[Solved] Checking user's cps option

#1 Post by kostek00 »

I would like to make a little check for cps set up by user. I didn't found anything that I think could help me with it in documentation. Any ideas how to do it?

Something like:

Code: Select all

if cps < 50:
show this
else:
show this
Last edited by kostek00 on Thu Mar 14, 2019 4:23 pm, edited 1 time in total.

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Checking user's cps option

#2 Post by Remix »

preferences.text_cps
Frameworks & Scriptlets:

User avatar
kostek00
Regular
Posts: 131
Joined: Wed Mar 28, 2018 5:54 pm
Contact:

Re: Checking user's cps option

#3 Post by kostek00 »

This is very strange. I already tried this and it was always executing "else" part but just for peace of mind I checked it again and now it works as it should. I don't know why it's like that. Cache might have mess something earlier?

Edit: Oh, I know why it wasn't working. I thought it's max cps is 100 but in reality it was 200.

Thanks.

Post Reply

Who is online

Users browsing this forum: Bing [Bot]