Maya Training

Introduction to Hard Surface Modeling

Maya Training

Interiors and Furniture Vol 1 & 2 - Modeling & Cloth

Maya Training

Shading, Lighting and Rendering the Bedroom in MR

Maya Training

Robot volume one - Modeling with animation in mind

Maya Training

Spach-Alspaugh House the complete courseware

Maya Training

Burt The Cartoon Dinosaur Vol 01 - Modeling

New Maya Training

Robot Volume 02 - Hybrid Rigging
You are here > Home > SimplyMaya Community Forums
Loading

Welcome to Simply Maya

Please Sign in or Sign up for an account

Member Login

Lost your password?

Not a member yet? Sign Up!

Old 13-01-2004, 08:31 PM   #1
strytus
Registered User
 
Join Date: Dec 2002
Location: east coast
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
strytus is offline   Reply With Quote
Old 20-01-2004, 06:50 PM   #2
Alan
Moderator
 
Alan's Avatar
 
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
Thanks: 0
Thanked 5 Times in 5 Posts
Default

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
Alan is offline   Reply With Quote
Old 21-01-2004, 09:43 AM   #3
strarup
Subscriber
 
Join Date: Jan 2003
Location: Denmark
Posts: 338
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi strytus,

maybe you can use some of this from this tutorial by Swanimator... "Time offset Expression"... -->
http://www.swanimator.com/tipstutori...Expression.htm

regards

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

One mistake can ruin it all...
strarup is offline   Reply With Quote
Old 24-01-2004, 06:37 AM   #4
strytus
Registered User
 
Join Date: Dec 2002
Location: east coast
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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?
strytus is offline   Reply With Quote
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extremely annoying delay on input boxes in firefox David Members Lounge 0 01-12-2010 06:57 PM

Thread Tools





A little bit about who we are
Links you might find useful
Catch up with SimplyMaya
SimplyMaya specialises in Maya tutorials. We offer over 1,000 individual Maya training videos, ranging from basic Maya tutorials through to intermediate Maya tutorials. Our tutorials are created by instructors with industry experience and are designed to get you up and running in Maya quickly without making it seem like hard work.

Copyright © 1999-2015 SimplyMaya - vBulletin® Copyright © 2000-2015, Jelsoft Enterprises Ltd.