Setting a global variable string

I’m developing a ‘city builder’-type game, and when users select a city on the map, a couple of variables are shown (tax, capture cost etc). One of the variables is cityName, and I want to set a global variable of selectedCity to the cityName when it’s clicked, then display the name in the UI in the selectedCityLabel text object.
(I also want to take that name to a ‘view city’ scene, hence why I’d like to use a global variable)

I can do this with a normal scene variable (see attachment), but I can’t seem to set it as a global variable.

I’ve tried Do =City.VariableString(cityName) to the text of global variable selectedCity, but when I then try to display it with Do =ToString(GlobalVariable(selectedCity)) to the text of selectedCityLabel, it just shows a 0.

Any ideas?

Global variable must be a string variable and instead of ToString(GlobalVariable()) it must be GlobalVariableString() I guess.
Double check if all the variables are string variables.

Ah, there’s a GlobalVariableString! That sort of thing should really be in the Wiki :stuck_out_tongue: