Thursday, January 29, 2009

Scripts - Stage6

//this script introduces calling out objects by name in commands using strings
//it also has a problem...we solve it in the next one

float $rotate = 6.5;
//int $int = 1;
string $objectname;


int $i = 1;
while ($i<50){
//trick to refresh the frame
currentTime $i;

//$rotate = (1 * $i) + 2;
$rotate = (rand(10)) - 2;

//define object name variable
//$objectname = pCube1;
$objectname = ("pCube" + $i);


//duplicate, move and rotate
duplicate -rr $objectname;
move -r 0 -0.275236 0 $objectname;
rotate -r -os 0 0 $rotate $objectname;


//counts
$i = $i + 1;
}

No comments:

Post a Comment