Destroying Multipule Entities

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
Eleven Warrior
Posts: 752
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Destroying Multipule Entities

Post by Eleven Warrior »

Hi guys I did as you said and the second Function works good, which I connected to a Plate. So what do I do with the first Function, not that it matters as the 2nd does what I want anyway..??

function safeDestroy(entity)
if (entity ~= nil) then
entity:destroy();
end
end

function destroyEmiters()
for i = 1, 5 do
safeDestroy( findEntity("me"..i) );
end
end

EDIT: Are the 1st and 2nd functions connected in anyway?
Post Reply