Add example code for killing/removing creatures

This commit is contained in:
David Vogel 2023-02-25 13:51:17 +01:00
parent 7a85f646cb
commit 9494588e7b

View File

@ -432,6 +432,11 @@ local function captureModifyEntities(file, modify, x, y, radius)
-- Prevent it from being modified again. -- Prevent it from being modified again.
rootEntity:AddTag("MapModified") rootEntity:AddTag("MapModified")
-- Just a test on how to remove/kill creatures and enemies.
--if (rootEntity:HasTag("enemy") or rootEntity:HasTag("helpless_animal")) and not rootEntity:HasTag("boss") then
-- rootEntity:Kill()
--end
end end
end end