I have an object which is duplicated in the scene. I have assigned instance variables to those duplicates. For example, the String variable is attached to each of those duplicates. Again, I have named the same to all those string variables. I gave them the instance variable name “ID” without double quotes. The name is only the same but the values are different for each duplicate.
For example, one duplicate has an instance variable called ID with a value of 1, while the other duplicate has an instance variable called ID with a value of 2, and so on for the rest of the duplicate objects. I keep increasing the number in value for each new duplicate object.
Now, how do I set up expressions in the event sheet to identify the x position of each duplicate with the unique instance variable called ID? I just want to know how to set up their X-position, like how do I make the expressions when the system asks me to enter the value of the X position?
Like, I want to create a different object on the position of that object which has these instance variables. I am just stuck on what to enter in the position field. I want to specify the position as we do normally like this:
Object.X()
But this time, I want to specify the x position of the object of a certain ID, which is the instance variable.
So, how do I make up this expression?