Adding a switch to the Preferences to change a variable?

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
nevarran
Newbie
Posts: 6
Joined: Tue Jan 02, 2018 5:51 am
Contact:

Adding a switch to the Preferences to change a variable?

#1 Post by nevarran »

Hi, guys.
Is it possible to add a switch that changes a variable to the Preferences of my game? With 2 or 3 options (just like the "Skip").
I want to offer a choice to the players at the beginning of the game, but I would also like them to be able to change it on the fly as the game progresses.
I searched the web, but couldn't find anything on the subject.
Thank you.

User avatar
erickcire95
Regular
Posts: 33
Joined: Tue Dec 26, 2017 7:38 pm
Contact:

Re: Adding a switch to the Preferences to change a variable?

#2 Post by erickcire95 »

I have not tested it, but try using the Set Variable action

User avatar
mitoky
Veteran
Posts: 316
Joined: Sat Feb 07, 2015 9:12 pm
Projects: The Purring Demon's Love, circus eterie
Contact:

Re: Adding a switch to the Preferences to change a variable?

#3 Post by mitoky »

I think what you are looking for might be the one about June:
viewtopic.php?f=51&t=47328

nevarran
Newbie
Posts: 6
Joined: Tue Jan 02, 2018 5:51 am
Contact:

Re: Adding a switch to the Preferences to change a variable?

#4 Post by nevarran »

Thanks, guys. What mitoky suggested seems to be exactly what I'm looking for. I'll try it today.
Much appreciated.

Post Reply

Who is online

Users browsing this forum: Google [Bot], Ocelot