67 lines
1.2 KiB
Lua
67 lines
1.2 KiB
Lua
local numberOfCops = 0
|
|
|
|
minetest.register_abm({
|
|
nodenames = {"poop:grey_bricks"},
|
|
<<<<<<< HEAD
|
|
interval = 20,
|
|
chance = 300,
|
|
=======
|
|
interval = 30,
|
|
chance = 200,
|
|
>>>>>>> bcfc53e3489d47918c04d9ae562a665c71fc33ee
|
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
|
if numberOfCops < 50 then
|
|
minetest.add_entity({x = pos.x, y = pos.y + 1, z = pos.z}, "robocops:robocop")
|
|
numberOfCops = numberOfCops + 1
|
|
end
|
|
end
|
|
})
|
|
|
|
mobs:register_mob("robocops:robocop", {
|
|
type = "monster",
|
|
passive = false,
|
|
attack_type = "dogfight",
|
|
pathfinding = true,
|
|
reach = 2,
|
|
damage = 1,
|
|
hp_min = 21,
|
|
hp_max = 25,
|
|
armor = 100,
|
|
collisionbox =
|
|
{
|
|
-.4, 0, -.4, .4, 2, .4
|
|
},
|
|
pushable = true,
|
|
visual = "mesh",
|
|
mesh = "character.b3d",
|
|
textures =
|
|
{
|
|
{"robocops_robocop.png"},
|
|
},
|
|
|
|
makes_footstep_sound = true,
|
|
|
|
|
|
walk_velocity = 2,
|
|
run_velocity = 3,
|
|
jump_height = 1,
|
|
stepheight = 0,
|
|
floats = 0,
|
|
view_range = 60,
|
|
|
|
|
|
animation =
|
|
{
|
|
speed_normal = 30,
|
|
speed_run = 50,
|
|
stand_start = 0,
|
|
stand_end = 79,
|
|
walk_start = 168,
|
|
walk_end = 187,
|
|
run_start = 168,
|
|
run_end = 187,
|
|
punch_start = 200,
|
|
punch_end = 219
|
|
},
|
|
})
|