I've got ~20 of these pairs on the map in my game.
When the City is 'captured', (a variable is changed) I'd like to change the City Name text object colour, but I can't figure out how to 'target' the nearby text object to change it.
I've looked into linking objects, but the neither the City objects or City Name text objects are unique, so it affects all of them in the scene.
I also considered the following:
- Collisions, but text objects don't have collision masks!
- Pick the Nearest Object - in order to 'capture' a city, a player unit has to be in contact with the city collision mask (about 10 pixels out) and for design reasons, the text object is about 20-30 pixels away from the city object depending on the zoom level
Is it possible to somehow target the closest text object? Or is there an expression that I can use in the Link Two Objects action that I've not found?