facehugger.lua 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. -- By FreeGamers.org
  2. -- Facehuggers inspired by Alien,Aliens.
  3. -- Texture, model, and foundation from "mobs_scifi" by D00Med.
  4. mobs:register_mob("mobs_creatures:facehugger", {
  5. type = "monster",
  6. passive = false,
  7. attacks_monsters = false,
  8. damage = 5,
  9. reach = 2,
  10. attack_type = "dogfight",
  11. hp_min = 5,
  12. hp_max = 5,
  13. armor = 100,
  14. collisionbox = {-0.3, -0.1, -0.3, 0.3, 0.1, 0.3},
  15. visual = "mesh",
  16. mesh = "mobs_creatures_facehugger.b3d",
  17. textures = {
  18. {"mobs_creatures_facehugger.png"},
  19. },
  20. sounds = {
  21. random ="mobs_creatures_facehugger_random",
  22. jump = "mobs_creatures_facehugger_jump",
  23. damage = "mobs_creatures_facehugger_damage",
  24. death = "mobs_creatures_facehugger_death",
  25. },
  26. blood_texture = "mobs_blood.png",
  27. visual_size = {x=1, y=1},
  28. makes_footstep_sound = true,
  29. walk_velocity = 1,
  30. run_velocity = 3,
  31. jump = true,
  32. stepheight = 1.5,
  33. water_damage = 0,
  34. lava_damage = 2,
  35. light_damage = 0,
  36. view_range = 7,
  37. animation = {
  38. speed_normal = 12,
  39. speed_run = 20,
  40. walk_start = 10,
  41. walk_end = 30,
  42. run_start = 10,
  43. run_end = 30,
  44. punch_start = 30,
  45. punch_end = 43,
  46. },
  47. -- do_custom = function(self)
  48. -- local pos = self.object:getpos()
  49. -- local objs = minetest.get_objects_inside_radius(pos, 2)
  50. -- for _, obj in pairs(objs) do
  51. -- if obj:is_player() and obj:get_attach() == nil then
  52. -- obj:set_attach(self.object, "", {x=.2, y=15, z=3}, {x=-100, y=225, z=90})
  53. -- self.object:set_animation({x=46, y=46}, 20, 0)
  54. -- end
  55. -- end
  56. -- end,
  57. -- on_die = function(
  58. })
  59. -- Register Spawn Egg
  60. mobs:register_egg("mobs_creatures:facehugger", "Facehugger Spawn Egg", "default_obsidian.png", 1)
  61. -- Register Spawn Parameters
  62. --mobs:spawn_specific("mobs_creatures:facehugger", {"default:dirt_with_dry_grass"}, {"default:stone"}, 20, 0, 300, 15000, 2, 31000, 31001)