Home Forums Development discussions Future development Reply To: Future development

#237
Sponk
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 9 years, 7 months ago by Sponk.