[Fixed] Affect NewLine() while changing text

Hi, im confront to a problem.
Im making a text appear when the player is in collision with a panel.
When the text appear, I change it to a variable that is store in the panel.
So when the player hit a panel, a text appear with the text store in the variable of the panel the player is in collision with.
Im doing this way so whenever the player hit a new panel, I can change the text variable of each panel so the text appear depend what panel he hit. So far it work well.
Here is the Gdevelop part : prntscr.com/idio3o
But what Im trying to do is to insert new line in the text that appear.
So in the text variable of the pannel Im doing something like : “test”+NewLine()+“test2”
But it make this : prntscr.com/idimvw
Is there any way to fix this ?

I can’t see anything wrong in what you’ve shown, so the problem may be in the action where you set the value of the object variable Texte.

Well the variable of the panel is like that: prntscr.com/ie300f
And there is only one way to change the text of a text object: prntscr.com/ie30vt
So I don’t see any other way to do

Inside the variable panel expressions can not be used as default values, only string or number value can be used so even if you enter an expression as default value it is considered a string I guess.

Set the value of the variable using an event instead.

I just found a solution the most basic possible…
You can actual do a new line in the text editor of Gd5…
Here is the exemple: prntscr.com/ieaa5j
And so the text = this variable and it work perfectly
Here : prntscr.com/ieaaj9
So yeah, it’s fix not on purpose haha :laughing:

Cool, I didn’t know that :smiley: