Make villager stand still if there is near player
[MineClone/MineClone2.git] / mods / ENTITIES / mobs_mc / agent.lua
bloba550117532740d35709de0595200df994cf7c13c
1 --###################
2 --################### AGENT
3 --###################
5 -- intllib
6 local MP = minetest.get_modpath(minetest.get_current_modname())
7 local S, NS = dofile(MP.."/intllib.lua")
9 mobs:register_mob("mobs_mc:agent", {
10 type = "npc",
11 passive = true,
12 stepheight = 1.2,
13 hp_min = 20,
14 hp_max = 20,
15 armor = 100,
16 collisionbox = {-0.35, -0.01, -0.35, 0.35, 1, 0.35},
17 visual = "mesh",
18 mesh = "mobs_mc_agent.b3d",
19 textures = {
20 {"mobs_mc_agent.png"},
22 visual_size = {x=3, y=3},
23 walk_velocity = 0.6,
24 run_velocity = 2,
25 jump = true,
26 animation = {
27 stand_speed = 25,
28 walk_speed = 25,
29 run_speed = 50,
30 stand_start = 20,
31 stand_end = 60,
32 walk_start = 0,
33 walk_end = 20,
34 run_start = 0,
35 run_end = 20,
39 mobs:register_egg("mobs_mc:agent", S("Agent"), "mobs_mc_spawn_icon_agent.png", 0)
41 if minetest.settings:get_bool("log_mods") then
42 minetest.log("action", "MC Agent loaded")
43 end