Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for _, obj in ipairs(minetest.get_objects_inside_radius(mobpos, 10)) do
- if not obj:is_player() then
- mobsclose = mobsclose + 1
- if mobsclose >= 4 then
- if obj:get_luaentity() then
- local ent = obj:get_luaentity()
- local mobhp = ent.health
- local mobmhp = ent.hp_max
- if mobhp and mobmhp and mobhp == mobmhp then
- obj:remove()
- end
- end --- IF OBJ IS ENTITY END
- end --- IF MORE THAN 3 MOBS CLOSE TO PLAYER END
- end --- IF OBJECT NO PLAYER END
- end --- LOOP END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement