init.lua 660 B

123456789101112131415161718192021222324252627
  1. local modname = minetest.get_current_modname()
  2. minetest.register_entity(modname .. ":spider", {
  3. initial_properties = {
  4. visual = "mesh",
  5. mesh = "eg_spiders_spider.b3d",
  6. physical = true,
  7. collide_with_objects = true,
  8. collisionbox = {-0.33, -0.3, -0.33, 0.33, 0.125, 0.33},
  9. },
  10. on_activate = function(self, staticdata, dtime_s)
  11. mobkit.actfunc(self, staticdata, dtime_s)
  12. local props = self.object:get_properties()
  13. props.textures = {
  14. "eg_spiders_torso.png",
  15. "eg_spiders_eyes.png",
  16. "eg_spiders_fangs.png",
  17. "eg_spiders_legs.png"
  18. }
  19. self.object:set_properties(props)
  20. end,
  21. on_step = mobkit.stepfunc,
  22. logic = function(self)
  23. end,
  24. })