Switching between databases
Switching between databases
Hi, I am trying to create a game with two language options in it. What my idea was is to have two buttons when the game starts or on the pause menu, one says English and one says Spanish. I want to be able to click the button I want and have it set the Database I am using. For example I have an NPC and when you enter the trigger it will play the english verion, but then I would have a second conversation trigger on it and when the database is the spanish version then it will play the spanish text. Hope you can help!
Re: Switching between databases
I watched this tutorial https://www.youtube.com/watch?v=lG-k10t3Dz4, but I didn't work for me. I don't need to switch between scenes like in the video. I just want to be in one room and have the buttons switch the database for me. Then when I enter the NPC conversation after I press a button it will play the correct conversation trigger.
Re: Switching between databases
Never mind I figured it out. I had to change the order that I was adding and removing items.
Re: Switching between databases
You don't need two separate databases for language localization. The Dialogue System has built-in localization within the same database.
- Localizing dialogue text, quests, actor names, etc.
- Localizing UIs and misc. text
- How to switch languages
Code: Select all
public void SetSpanish()
{
DialogueManager.SetLanguage("es"); // Or whatever you use to denote Spanish. ("es" is the .NET convention)
}