2010

Table Of Contents
5 To make Balloon return to the origin, change the expression to this:
if (time < 2)
Balloon.translateY = 0;
if (time < 2)
Balloon.scaleY = time;
if (time >= 2)
Balloon.translateY = time;
The new first statement sets Balloon.translateY to 0 whenever time is less
than 2.
Note that you can put the three statements in any order in this example.
When Maya plays each frame, it executes each statement in the expression
in the order listed. In this example, the statements work independently,
so their order doesnt matter.
We put the statements in the order of time execution because its easier
to see the logic of the expression. If you ever need to change the
expression, youll be able to grasp the expressions actions more quickly.
6 Click Edit.
7 Stop the animation and go to the start time.
The flattened Balloon returns to its correct position at the origin.
8 Play the animation.
Balloon inflates for two seconds, then rises. As it rises, it jumps slightly
higher at approximately frame 48.
638 | Chapter 12 Expressions