Home › Forums › Development discussions › Future development › Reply To: Future development
September 1, 2014 at 18:55
#237

Keymaster
That’s easy. Just put them in a list and iterate through it:
local objectList = {}
-- Do this with all objects you want to have. You only have to change "SomeObject" to the new name
objectList[#objectList+1] = getObject("SomeObject")
for i = 1, #objectList, 1 do
-- Insert your mesh file here
replaceObject(objectList[i], "meshs/somefile.mesh")
end
-- Set the list to nil so we can't try to access invalid pointers to objects
-- That got deleted in "replaceObject"
objectList = nil
-
This reply was modified 8 years, 9 months ago by
Sponk.