Digital humans the art of the digital double
Ever wanted to know how digital doubles are created in the movie industry? This course will give you an insight into how it's done.
# 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

# 2 20-01-2004 , 06:50 PM
Alan's Avatar
Moderator
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
I think you may need to use setAttr rather than saying pSphere1.translateX.

so
setAttr pShere1.tx $cube1Xpos;
setAttr pShere1.ty $cube1Ypos;
setAttr pShere1.tz $cube1Zpos;

try that, is this an expression or a script? cause that will make a difference to your syntax.

Post again if you need more help

Alan


Technical Director - Framestore

Currently working on: Your Highness

IMDB
# 3 21-01-2004 , 09:43 AM
Subscriber
Join Date: Jan 2003
Location: Denmark
Posts: 338


------------------------------------------------
Alex V. U. Strarup

One mistake can ruin it all...
# 4 24-01-2004 , 06:37 AM
Registered User
Join Date: Dec 2002
Location: east coast
Posts: 84
Thanks strarup

but what's the difference between the scripted i typed in and the one that's on the link???? is it only because I done mine is Z, Y, X order instead of the XYZ order?

Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads