I guess this doubt has already been solved in another thread but I have not found it.
For our games we usually use a code similar to this: [Gender: he, she]. If the gender of the player is male then "he" appears, otherwise "she" appears. This allows us to use the same string for both genders.
Is it possible to do something similar using Dialogue System?
I have tried to call to an own function that modifies the text to show in StardardUISubtittlePanel.SetSubtitleTextContent but for some reason that I don't know, I cannot call to our code from the scripts of your asset.
Thanks!
How to modify parts of text according to the player's gender?
Re: How to modify parts of text according to the player's gender?
Hi,
This post explains one way to do it. This post contains another example.
Alternatively, you can set a Dialogue System variable to the player's gender. For example:
Then use the [var=variable] tag, such as: "I think [var=playerPronoun] is very nice.".
This post explains one way to do it. This post contains another example.
Alternatively, you can set a Dialogue System variable to the player's gender. For example:
Code: Select all
DialogueLua.SetVariable("playerPronoun", "she");
Re: How to modify parts of text according to the player's gender?
Thanks! The second example has helped us a lot!