Making a button to switch text?

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
Chell
Newbie
Posts: 14
Joined: Fri Dec 30, 2016 10:11 pm
Tumblr: schneizel
itch: lycheegames
Contact:

Making a button to switch text?

#1 Post by Chell »

Hi everyone!
I was wondering if there's an easy way to create the following mechanism: Every sentence in the game would get an alternative version which could be found by pressing a button. I wanted to develop it for a language learning game (so it'd be bilingual) but it could be useful to switch between sayings and thoughts, split personalities, etc.
I searched a bit and found nothing, so I thought maybe I should ask. Sorry if it's a noobish question and I searched all the wrong words. Thanks in advance!

User avatar
qirien
Miko-Class Veteran
Posts: 541
Joined: Thu Jul 31, 2003 10:06 pm
Organization: Metasepia Games
Deviantart: qirien
Github: qirien
itch: qirien
Location: New Mexico, USA
Discord: qirien
Contact:

Re: Making a button to switch text?

#2 Post by qirien »

Ren'Py has a lot of support for different languages, and you can use the renpy.change_language function to switch between them.

This would change the language of every element in the game at once (including the UI), but if you made it an easily-clickable button on every screen, I think it would work pretty well.

See the Translation page for more info on making multilingual games.
Finished games:
Image
Image
Image

Chell
Newbie
Posts: 14
Joined: Fri Dec 30, 2016 10:11 pm
Tumblr: schneizel
itch: lycheegames
Contact:

Re: Making a button to switch text?

#3 Post by Chell »

qirien wrote:Ren'Py has a lot of support for different languages, and you can use the renpy.change_language function to switch between them.

This would change the language of every element in the game at once (including the UI), but if you made it an easily-clickable button on every screen, I think it would work pretty well.

See the Translation page for more info on making multilingual games.
Wow, sorry I didn't answer before, but thanks a lot for linking me because it's all I needed for my VN right now. :) Thanks a lot and I'll check your work if it's ok!

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], NeonNights