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]