Montar um mod no outro 985 B

123456789101112131415161718192021222324252627282930
  1. --montaria script
  2. after_activate = function(self,pointed_thing,pos)
  3. --local ferramenta = clicker:get_wielded_item()
  4. pos = self.object:get_pos()
  5. --self.object:remove()
  6. local mod_cima = minetest.add_entity(pos, "monstro_aranha_montado:esqueletomonstroarqueiro")
  7. local ent = mod_cima:get_luaentity()
  8. ent.health= self.health
  9. ent.visual_size={x = 1, y = 1, z =1}
  10. mod_cima:set_properties({physical=false,})
  11. mod_cima:set_attach(self.object,"",{x = 0, y = 6, z =0}, {x = 0, y = 0, z = 0})
  12. --mobs:set_animation(mod_cima, die)
  13. end,
  14. do_custom = function(self, dtime)
  15. if self.object:get_attach() then
  16. self.object:set_properties({physical=true,})
  17. end
  18. end,
  19. --script mob montado
  20. do_custom = function(self, dtime)
  21. if self.object:get_attach() then
  22. self.object:set_properties({physical=true,})
  23. --mobs:set_animation(self, die)
  24. end
  25. end,