Thursday, January 29, 2009

Scripts - Stage8

//this version introduces manipulating object parts - verticies, planes, etc.

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


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

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

//define move value
float $move_y = .2 * $i;
float $move_x = .1 * $i;

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


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


//move vertex
//move -r 0 -0.137064 0 pCube1.vtx[0];
move -r 0 (-0.05 * $i) 0 ("pCube" + $i + ".vtx[0]");


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

No comments:

Post a Comment