local minetest,math,vector = minetest,math,vector
--this is where mobs are defined
---this is going to be used to set an active mob limit
-global_mob_amount = 0
-
local path = minetest.get_modpath(minetest.get_current_modname())
dofile(path.."/spawning.lua")
collide_with_objects = false,
collisionbox = {-0.37, 0, -0.37, 0.37, 1.75, 0.37},
visual = "mesh",
- visual_size = {x = 3, y = 3},
+ visual_size = {x = 9, y = 9},
mesh = "snowman.b3d",
textures = {
"snowman.png","snowman.png","snowman.png","snowman.png","snowman.png","snowman.png",
-----
- --head_bone = "Bone",
+ head_bone = "head",
debug_head_pos = false,
- head_directional_offset = 0, --used in vector.multiply(minetest.yaw_to_dir(body_yaw),head_offset)
- head_height_offset = 1.625, --added to the base y position
+ rotational_correction = math.pi/2,
+ head_directional_offset = 0.01, --used in vector.multiply(minetest.yaw_to_dir(body_yaw),head_offset)
+ head_height_offset = 1.65, --added to the base y position
--use this to correct the head position initially because it becomes severly offset - look at your blender model to get this perfect
- head_position_correction = vector.new(0,4.6,0),
+ head_position_correction = vector.new(0,0.6,0),
--this is used to tell the game the orientation of the bone (swaps x to and y, then z and y)
head_coord = "vertical",
- --rotational_correction = math.pi/2,
+ flip_pitch = true,
-----
is_visible = true,
die_sound = "wool",
- hostile = true,
+ hostile = false,
+ attacked_hostile = true,
attack_type = "projectile",
projectile_type = "weather:snowball",
projectile_timer_cooldown = 1,
gravity = {x = 0, y = -9.81, z = 0},
movement_type = "jump",
make_jump_noise = true,
- max_speed = 5,
+ max_speed = 4,
hostile = true,
state = 0,
view_distance = 20,
gravity = {x = 0, y = -9.81, z = 0},
movement_type = "jump",
make_jump_noise = true,
- max_speed = 5,
+ max_speed = 4,
hostile = true,
state = 0,
view_distance = 20,
gravity = {x = 0, y = -9.81, z = 0},
movement_type = "jump",
make_jump_noise = true,
- max_speed = 5,
+ max_speed = 4,
hostile = true,
state = 0,
view_distance = 20,
]]--
+
+mobs.register_mob(
+ {
+ mobname = "zombie",
+ physical = true,
+ collide_with_objects = false,
+ collisionbox = {-0.37,0, -0.37, 0.37, 1.7, 0.37},
+ visual = "mesh",
+ visual_size = {x = 3.2, y = 3.2},
+ mesh = "zombie.b3d",
+ textures = {
+ "zombie.png"
+ },
+ is_visible = true,
+ pointable = true,
+ automatic_face_movement_max_rotation_per_sec = 300,
+ makes_footstep_sound = false,
+ hp = 27,
+ gravity = {x = 0, y = -9.81, z = 0},
+ movement_type = "walk",
+ max_speed = 3,
+ hostile = true,
+ hostile_cooldown = false,
+ state = 0,
+ view_distance = 32,
+ item_drop = "mob:cooked_porkchop",
+
+ standing_frame = {x=0,y=0},
+ moving_frame = {x=0,y=40},
+ animation_multiplier = 20,
+ ----
+ pathfinds = true,
+
+ --these are used to anchor a point to the head position
+ -----
+ automatic_face_movement_dir = 0,
+ head_bone = "Head",
+ debug_head_pos = false,
+ --this always has to be slightly positive
+ head_directional_offset = 0.01,
+ head_height_offset = 1.55, --added to the base y position
+ --use this to correct the head position initially because it becomes severly offset - look at your blender model to get this perfect
+ head_position_correction = vector.new(0,2.4,0),
+ head_coord = "vertical",
+ -----
+
+
+ death_rotation = "x",
+
+ hurt_sound = "hurt",
+ die_sound = "hurt",
+ sound_pitch_mod_min = 60,
+ sound_pitch_mod_max = 80,
+ sound_pitch_mod_min_die = 50,
+ sound_pitch_mod_max_die = 70,
+ attack_type = "punch",
+ attack_damage = 3,
+
+ die_in_light = true,
+ --die_in_light_level = 12,
+ fire_table = {
+ visual_size = vector.new(1/4,2/3,1/4),
+ position = vector.new(0,3.3,0),
+ }
+ }
+)
+
+
mobs.register_mob(
{
mobname = "creeper",
hp = 27,
gravity = {x = 0, y = -9.81, z = 0},
movement_type = "walk",
- max_speed = 5.5,
+ max_speed = 4,
hostile = true,
hostile_cooldown = false,
state = 0,
hp = 27,
gravity = {x = 0, y = -9.81, z = 0},
movement_type = "walk",
- max_speed = 5.5,
+ max_speed = 4,
hostile = true,
hostile_cooldown = false,
state = 0,
hp = 40,
gravity = {x = 0, y = -9.81, z = 0},
movement_type = "walk",
- max_speed = 9,
+ max_speed = 6,
hostile = true,
hostile_cooldown = false,
state = 0,
--projectile_type = "tnt:tnt",
explosion_radius = 6, -- how far away the mob has to be to initialize the explosion
- explosion_power = 14, -- how big the explosion is (radius)
+ explosion_power = 6, -- how big the explosion is (radius)
explosion_time = 3, -- how long it takes for a mob to explode
explosion_blink_timer = 0.1, -- how fast the blinking happens
hp = 30,
gravity = {x = 0, y = -9.81, z = 0},
movement_type = "walk",
- max_speed = 6,
+ max_speed = 4,
state = 0,
view_distance = 32,
hp = 30,
gravity = {x = 0, y = -9.81, z = 0},
movement_type = "walk",
- max_speed = 6,
+ max_speed = 4,
state = 0,
view_distance = 32,