Hi team, trying another way to change the dialog language,
So basically I set up a global variable (if language is Chinese)
then goes to Yarn (still trying to figure out this new system)
and trying to add those commands in it to show different dialog
like if global variable is true (or == 1) then show this dialog.
but somehow it just doesn’t work…
Help…
tried to update the command line still doesn’t work…
If I use dialog tree:: branch text it just shows the whole command line…
Where are you setting the language? You would need this action in an event somewhere, with whatever conditions you want (a button press, for example). Do this before your dialogue launch event i.e. in an event above the one where dialogue is launched.

Your Yarn if-block formatting is correct (your second screenshot, not the first one) though delete the second set of closing ‘>>’ (the grey ones).
You may find this helpful:
1 Like
just figured out the variables with $ is actually a totally different system so I have to make an event to make the variables inside yarn equals the global variables, really with there’s a detailed manual with all commands so it can be a bit more clear what to do…
SET VARIABILE
<< set $VALUE = 0 >>
SET STRING
<< set $variablename = “free text” >>
HOW USE IF THEN (VALUE):
<<if $VALUE is 0>>
write here what happens
<< endif>>
HOW USE IF THEN (STRING):
<<if $variablename is “free text”>>
write here what happens
<< endif>>
IF YOU HAVE MULTIPLE CONDITIONS:
<<if $variablename1 is “A”>>
<<if $variablename2 is “B”>>
<<if $variablename3 is “X”>>
write here what happens
<< endif>> << endif>> << endif>>
ELSE IF:
<<if $GOTO is 0>>
write here what happens
<<elseif $GOTO is 1>>
write here what happens
<< endif>>
Exporting a string from Yarn to Gdevlop:
ToString(DialogueTree::Variable(“NameVariable”))
It is essential to remove the “$” from the beginning of the string name! In Yarn the same variable will be $NameVariable
Send from Gdevelop to Yarn

Pay attention to“$” from the beginning of the string name in Yarn, i remember you need always to use it!
1 Like