i’ve put 5 enemy in my map and start killing it but i’ve kill one enemy but all enemy get kill
Here’s my script on enemy
function on_message(self, message_id, message, sender)
if message_id == hash("contact_point_response") then
if message.group == hash("flying") then
go.delete()
end
end
That looks correct. So you have five game objects, each with a collision object attached? Where is the snippet of code that you shared attached? To the game objects?
This should be exactly the same thing. Calling go.delete() without specifying an id implies the current game object, ie the one with id same as go.get_id().