Godot Version
Godot 4
Question
Anyone know how to create multilines string in the animation player method ? I've tried using \n but it doesn't seem to work
Godot 4
Anyone know how to create multilines string in the animation player method ? I've tried using \n but it doesn't seem to work
It doesn’t look like the value is passed as one would expect. I might even call this a bug?
However you can work around this using the replace method of the string class.
Change \n
to -nl
and then parse the parameter with this:
another -nl new place
print(s.replace("-nl", "\n"))
Obviously you can change -nl
to whatever you want however \n
will not work.
Actually you can use \n if you escape the search string:
print(s.replace("\\n", "\n"))
The animation player must be inserting escaping into the argument string.