Skip to content

Instantly share code, notes, and snippets.

@AntumDeluge
Forked from bigfoot547/example.lua
Created May 29, 2017 07:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AntumDeluge/b8882b6c3be372812ff73e758f6e65d6 to your computer and use it in GitHub Desktop.
Save AntumDeluge/b8882b6c3be372812ff73e758f6e65d6 to your computer and use it in GitHub Desktop.
local name, count
for name in pairs(minetest.luaentities) do
if name == "mobname" then -- Replace mobname with the name of the mob
count = count + 1
end
end
if count >= mobcap then return end -- Replace mobcap with the number of mobs at a time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment