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.
I'm currently working on coding a menu for my game. I want to give players the option to toggle between english and spanish within the navigation menu. So basically, if they click "english" or "spanish" - all of the buttons in the menu will change to one or the other. Below is the UI design I created for the navigation menu to show roughly what I hope to accomplish:
I guess I'm wondering, what would be the best way to go about doing this? I have never done anything like this before in Ren'Py and I don't even know where to start.
Here is the code I'm using for my navigation (english) menu in Ren'Py, mostly with image maps and hotspots:
sasquatchii wrote: ↑Tue Sep 01, 2020 2:11 am
Hello,
I'm currently working on coding a menu for my game. I want to give players the option to toggle between english and spanish within the navigation menu. So basically, if they click "english" or "spanish" - all of the buttons in the menu will change to one or the other. Below is the UI design I created for the navigation menu to show roughly what I hope to accomplish:
I guess I'm wondering, what would be the best way to go about doing this? I have never done anything like this before in Ren'Py and I don't even know where to start.
Here is the code I'm using for my navigation (english) menu in Ren'Py, mostly with image maps and hotspots:
Any ideas or help would be much appreciated! Thanks for reading
What you can do is to have a variable, let's call it 'lang' that you can set to 'eng' or 'span'.
If the player clicks the button "English", action SetVariable("lang", "eng")
If the player clicks the button "Spanish", action SetVariable("lang", "span")
Whenever there is a place in the code where something could be presented either in English or Spanish, use an if/elif statement