Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Programming (https://simplymaya.com/forum/forumdisplay.php?f=32)
-   -   supernewbie question (https://simplymaya.com/forum/showthread.php?t=29644)

phonk 17-04-2008 02:23 PM

supernewbie question
 
I'm a worthless melscripter, but I need to setup a very very simple thing:

I have five objects. Now I want to make object2 translate 0.9 times the translation of object1. And make object3 translate 0.8 times the translation of object1, and so forth..

I reckon it's deadsimple, but I just don't have the time to dive into melscripting for a few days to get the basics in my head..

t.i.a.

phonk 17-04-2008 03:45 PM

got it!!
Googled a bit and found this script:

int $frameOffset = 3;
int $currentFrame = `currentTime -q`;

for ($i=1; $i<=300; $i++)
{
int $currentOffset = $currentFrame - ($frameOffset*$i);
string $CMD = "setAttr domino" + $i + ".rz " + `getAttr -t $currentOffset dominoMaster.rz`;
eval $CMD;
}

that does the trick!
whoowhoopeedoo


All times are GMT. The time now is 04:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018