View Single Post
# 1 13-01-2004 , 08:31 PM
Registered User
Join Date: Dec 2002
Location: east coast
Posts: 84

delay reaction script

Hey guys, i'm trying to make a delayed reaction and was hoping a script would justify it. I have looked on the sticky thread and found it to be of good use, but after that i'm stuck. (i'm not a scripter of any sort) Basically i'm using this script for a halo right above my angels head.


I used the:
Attribute of an object at a certain “offset"

int $offset = 10;
int $currentTime = `currentTime -q`;
$offsetTime = $currentTime - $offset;
$cube1Zpos = `getAttr -t $offsetTime pCube1.tz`;
pSphere1.translateZ = $cube1Zpos;

this works well for the only translate Z axis, then i've tried to duplicate it throughout the Y and X axis, but i get a syntax error
here's the modified version of it

int $offset = 10;
int $currentTime = `currentTime -q`;
$offsetTime = $currentTime - $offset;

$cube1Zpos = `getAttr -t $offsetTime pCube1.tz`;
$cube1Ypos = `getAttr -t $offsetTime pCube1.ty`;
$cube1Xpos = `getAttr -t $offsetTime pCube1.tx`;

pSphere1.translateZ = $cube1Zpos;
pSphere1.translateY = $cube1Ypos;
pSphere1.translateX = $cube1Xpos;

any suggestions on how to fix this or get it to work correctly

thanks in advance