MAXScript Language Reference > Names, Literal Constants, and Expressions > Context Expressions >

# Cascading Contexts

You can cascade a set of context prefixes, optionally separated by commas, onto one subject expression, effectively applying all the contexts (in order) to the subject expression.

FOR EXAMPLE:
    animate on, at time (t+1), with undo off,coordsys local
    (
    ...
    )

All the context forms are true expressions, yielding the value of their subject expression, so:

    pos0 = at time 35 $box01.position
    pos1 = at time 75 $box01.position
assigns the box01 position at time's 35 and 75 to variables pos0 and pos1 .

This is particularly useful with the at time context, as you can very easily do across-time computations.

The operand to an at time context can be any valid time value (numbers are taken as frames for convenience), including sub-frame times down to the tick level.

The animation system in 3ds Max will interpolate animated parameters at these fine levels so you can easily do sub-frame simulation computations.