2 Replies Latest reply on Dec 14, 2008 6:15 AM by wieble

    Why am i getting 'Object with Duplicate Name already Exists' when creating particle system?

      I am currently trying to use a particle system to create the illusion of snow over a scene. I have been trying to get it to compile but am constantly getting the same error. 'Object with duplicate name already exists.' however, even if i change the object name, i continue to get the same error.

      I have made the particle system a new behaviour in the cast list and dragged it onto the scene. I know its almost there because when the error does occue, the particles apprear in the scene but obviously not playing as it didnt compile propeprly.

      Can anyone help please?! Im in need of a more experienced lingo user! :)

      My code is below;

      global vSnowd, vSlope, vSnowM

      on beginSprite me

      -- generate new model resource object
      vSnowd = vSlope.newModelResource("Snowflakes", #particle)
      vSnowd.drag = 1
      vSnowd.emitter.maxspeed = 200
      vSnowd.emitter.mode = #stream
      vSnowd.emitter.numparticles = 500
      vSnowd.lifetime = 10000

      vSnowd.colorrange.start = rgb(random(255),random(255),random(255))
      vSnowd.colorrange.end = rgb(random(100),random(100),random(100))
      vSnowd.gravity = vector(0,-4,0)

      -- generate new model object, assigning it the created model resource
      vSnowM = vSlope.newModel("Snow", vSnowd)
      vSnowM.transform.position = vector (1200.000, 500.000,600.000)


      any help would be so much appreciated!!! Thank you!!!