BeF1990
#1
Hi.
Lets say I have two objects “NewText” and “NewSprite”.
The “NewSprite” has variable:
At the beginning of the scene, I want to change the text of the “NewText” to the “color” variable of the “NewSprite”. I tried this:
but it doesn’t work as I expected. The “NewText” give me the output “0” instead of “white”. Why is that?
jack
#2
The expression-editor generates the wrong code (or the code is not processed correctly.)
Workaround: Replace ToString(NewSprite.Variable(id)) with NewSprite.VariableString(id).
I had the same problem, it would be great if someone could fix it.
https://forum.gdevelop.io/t/solved-read-instance-variable-string/40993
1 Like
BeF1990
#3
Thx bro!
The “object.VariableString()” works flawlessly. 
BWPanda
#4
5 Likes