Hello everyone.
Getting ahead with my creation of space shooter in Defold. Progress is really nice, but there is a thing that troubles me. While developing a collision response system for the bullet, the bullet is responding to collision response with enemies but not with asteroids.
Here are the ss:
and my code:
function on_message(self, message_id, message, sender)
if message_id == hash("collision_response") then
if message.group == hash("enemy") then
print("caughtout")
elseif message.group == hash("asteroids") then
print("a")
go.delete()
end
end
end
It does print caughtout but not a,neither does it delete itself. Moreover, the asteroids react on hitting player, as expected.
Where am I going wrong?
BTW: Thanks in advance…