PDA

View Full Version : expression update problem



bendingiscool
11-20-2008, 11:43 AM
Hey, I'm havng a problem with an expression, I'm trying to get Maya to do something when it reaches a current time, here's what I have so far...


int $time = `currentTime -query`;

if ($time = 100)
{

print whatever;// will be replaced by command later on

}


at the moment it prints the word every frame, where as I want it to only print when it gets to 100.

Any ideas what I'm doing wrong?

Cheers,

Chris

sunder
11-20-2008, 02:03 PM
Your condition needs two = sign like this ==
That means comparison. A single equals to sign refers to setting a value which will always set the condition to true. So it will always execute.

bendingiscool
11-21-2008, 07:13 AM
Thanks loads, completly forgot bout the equal to part ;)

Chris