View Single Post
# 2 28-10-2006 , 07:13 AM
Dann's Avatar
Registered User
Join Date: Feb 2003
Location: Los Angeles
Posts: 695
well if all of your objects are as well named as your example (boid_38 matches mackerel_anim38), the something like this should work

int $counter=1;
int $numObjs=38;

string $boid = "boid_1";
string $mackerel = "mackerel_anim1";

while ($counter <=$numObjs)
{
$boid = ("boid_"+$counter);
$mackerel = ("mackerel_anim"+$counter);
pointConstraint -offset 0 0 0 -weight 1 ($boid ) ($mackerel);

$counter += 1;
}

I have not had time to test the code but it should work. Gotta run. I hope this helped.

-dann

note: just tested it and it works fine. Just make sure you set the $numObjs variable to the number of boid objects in your scene.


Last edited by Dann; 28-10-2006 at 09:40 AM.