Home Forums Development discussions Future development Reply To: Future development

#237
SponkSponk
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 6 years, 11 months ago by SponkSponk.