Problem with Collision

i am working on game, in this game tank are coming from both direction, when i am firing bullet, if bullet collide with tank then tank are remove. it is working nice but,when many tank come on screen that time always remove last appear tank , but i am targeting first appear tank…

code of collision::
[lua]function onCollision(self, event)
if self.name == “bullet” and event.other.name ==“enytnk” then
enytnk:removeSelf()–enytnk is name of tank
end[/lua]
any help plz…

“HAPPY NEW YEAR”

[import]uid: 87661 topic_id: 19838 reply_id: 319838[/import]

try

[lua]function onCollision(self, event)
if self.name == “bullet” and event.other.name ==“enytnk” then
event.other:removeSelf()–enytnk is name of tank
event.other = nil
end[/lua] [import]uid: 12482 topic_id: 19838 reply_id: 76965[/import]

tanks hgvyas123…it is working [import]uid: 87661 topic_id: 19838 reply_id: 76979[/import]

welcome dude [import]uid: 12482 topic_id: 19838 reply_id: 76982[/import]