As far as I understand message.other_id is exactly the id of the object with which the collision occurs.
When I use print(message.other_id) the program prints the collision with the desired object, but it does not send a message to it
function on_message(self, message_id, message, sender)
if message_id == hash("contact_point_response") then
msg.post(message.other_id, "kill")
end
end
if message == hash("kill") then
print("message enter")
end
When I ask the object that should receive the “kill” message to output the name of the object it already encounters, I get “/instance0”. Is it something to do with the fact that I generate the first object (sending the message) using the factory ? (And he can’t send him a message either.)
if message_id == hash("contact_point_response") then
print(message.other_id)
end
In general, are there any peculiarities with message.other_id factory elements ?