how can i get a coordinate for a object

hi all , i want to get a coordinate for a object … and put it for another object >>

like :

local x1 ,x2 object1:get coordinate

object 2 :set coordinate (x1 ,x2 )

btw , the first object is moving in infine …

so any one can help me with a code plzz ? :slight_smile: [import]uid: 96162 topic_id: 36243 reply_id: 336243[/import]

All objects have the properties .x and .y - these are the location of the centre of the object. They can be read and set, eg:
[lua]
– read
print(obj.x,obj.y)
– set
obj.x, obj.y = 100, 100
[/lua]
Take a good look at the documentation! [import]uid: 8271 topic_id: 36243 reply_id: 143947[/import]

All objects have the properties .x and .y - these are the location of the centre of the object. They can be read and set, eg:
[lua]
– read
print(obj.x,obj.y)
– set
obj.x, obj.y = 100, 100
[/lua]
Take a good look at the documentation! [import]uid: 8271 topic_id: 36243 reply_id: 143947[/import]

All objects have the properties .x and .y - these are the location of the centre of the object. They can be read and set, eg:
[lua]
– read
print(obj.x,obj.y)
– set
obj.x, obj.y = 100, 100
[/lua]
Take a good look at the documentation! [import]uid: 8271 topic_id: 36243 reply_id: 143947[/import]

All objects have the properties .x and .y - these are the location of the centre of the object. They can be read and set, eg:
[lua]
– read
print(obj.x,obj.y)
– set
obj.x, obj.y = 100, 100
[/lua]
Take a good look at the documentation! [import]uid: 8271 topic_id: 36243 reply_id: 143947[/import]