on_collide
This is just a very little idea I'd like to share, nothing more:
What about having the possibility to add "on_collide" to an entity definition? I could look somthing like:
This would allow a car (maybe I'll create one if Melkor shares his mesh) to hurt players it touches if it's fast or to destroy walls if it crashes into them... What do you think?
What about having the possibility to add "on_collide" to an entity definition? I could look somthing like:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest.register_entity("mod:entity",{
(...),
on_collide = function(self,pos,collider)
-- Code goes here
end
})
This would allow a car (maybe I'll create one if Melkor shares his mesh) to hurt players it touches if it's fast or to destroy walls if it crashes into them... What do you think?