At one point in my code a string variable will contain the name of an object on the screen.
String variable will now hold the string "tower01" which is the name of an object on screen. I want to then use this to manipulate that object but the following doesn't workCode:selectedUnit = (event.target.name);
I want to make the tower01 object's x co-ord to 100 but it seems I can't use a variable holding the object's name in place of the object's name.Code:selectedUnit.x = 100;