At 3/30/09 05:14 PM, evan210 wrote:
i'm trying to make 20 pedobears and 20 angry faics to appear, but only 1 pedobear and 20 angry faics appear. here's the duplicate script i'm using:
for (i=1; i<20; i++) {
duplicateMovieClip(_root.pedobear, "pedobear"+i, 1000+i);
}
for (i=1; i<20; i++) {
duplicateMovieClip(_root.angry_faic, "angry_faic"+i, 1001+i);
}
Dunno if you still have a problem with that but its because the depths overlap.
Basically the 10 pedobears would be made and have the depths 1001-1011 then the angry faics would be spawned having the depths 1002-1012.
When another object is spawned with the same depth as another object it basically replaces it.
The best thing you could use for the depths would be '_root.getNextHighestdepth()' or make sure you don't overlap the values.
This should work.
for (i=1; i<20; i++) {
duplicateMovieClip(_root.pedobear, "pedobear"+i, _root.getNextHighestDepth());
}
for (i=1; i<20; i++) {
duplicateMovieClip(_root.angry_faic, "angry_faic"+i, _root.getNextHighestDepth());
}
Untested but it should be fine.