Page 1 of 1

Destroying Multipule Entities

Posted: Thu Oct 03, 2013 6:26 am
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?