Hello. I’m currently working on a project and I was assigning a text variable of an object to a global variable if the player came in contact with said object. The issue I ran into was when I assigned the objects variable, the editor in the event sheet added a “To String” since it said it would otherwise return a number. In the screen shot below, the bottom action is what GDevelop automatically put out after I clicked on my object and its string variable. That already seemed strange, since its a string, I don’t understand why it is saying it would return a number.
What I ended up doing is manually adding the “VariableString” post mark instead of it simply being “Variable”. The top example in the screenshot is what I wrote out myself and that one worked as intended.
Keep in mind, I made sure to click the “change the text” and not “change the value” so I’m not sure why it wrote it out as a regular variable and converted it to a text after the fact. I’m sure I missed something obvious but let me know.
To recreate, simply have a text object and try to change the text to that of an object’s string variable. In that order too, not the other way around. It always writes out the “To string” despite it not being a number variable to begin with