View Single Post
# 1 07-12-2009 , 07:21 AM
Subscriber
Join Date: Mar 2008
Posts: 33

Duplicate array script

Hi,

I'm just getting started with scripting and I'm trying to create a simple script that would duplicate an object i've created in an array. I found a bunch of tutorial on how to create an array of objects with a for loop and I can get as far as that, but when it comes to duplicates, they all appear on top of each other... Here's my script:

// I'll use a sphere for the purpose of this example
//but in reality it is 2 planes grouped together

polySphere;
rename pSphere1 a1;

int $i;
for($i=1; $i<7; $i++){
duplicate a1;
move ($i*2) 0 ($i*2);
}

Any ideas?