MAXScript Language Reference > 3ds Max Objects > Animation Controllers > Controller Types > Script Controllers >

# Matrix3 Scripted Controller

| Animation Controllers - Quick Navigation

The Transform Script controller contains all of the information contained in a Position/Rotation/Scale (PRS) controller in one scripted matrix value. Instead of having three separate tracks for position, rotation, and scale, all three values can be simultaneously accessed from one script controller dialog. Because a script defines the transform values, they are easier to animate.

The value of the controller script must be a matrix3 values . A matrix3 value is a 4x3 3D transformation matrix.

The software interprets the text you type into the Script text box as the body of a MAXScript block expression. You can type as many expressions as you want on as many lines as you want, and they are evaluated in turn. The value of the last expression is taken as the controller value. This must yield a matrix3 value for Transform Script controllers.

Since the text is inside a block expression, you can declare local variables, which are visible only within the script and are temporary for one evaluation. You can also declare or access global variables that are shared with all other scripts in MAXScript and hold their values from one evaluation to the next.

The software with respect to a specific animation time always evaluates a controller. This might be the current time slider or incrementing frame time if an animation is playing, or a rendering is under way. In the case of Script controllers, the time being evaluated is used to establish an automatic "at time" context around the controller script, so any properties you access (outside of other explicit "at time" expressions) yield the correct values for the current controller evaluation time. This means you don't have to do anything special in your scripts to work at the correct time. You can access the evaluation time, with the standard MAXScript variable, current Time. You can also reference scene property values at other times by using "at time" expressions in your scripts, as in regular MAXScript programming.

EXAMPLE
    t=transform_script ()
    t.script ="(matrix3 1)"

#### See Also

- transform_script - superclass: Matrix3Controller

- Script Controllers

- How do I keep a Plane aligned to 3 Point Helpers?