Assigning Variables

In the previous lesson, you entered the string "Hello" in MAXScript, and MAXScript displayed the same string as its command output. When you enter other strings, MAXScript displays them and forgets about the previous ones.

To make MAXScript remember the value of a string, you can assign it to a variable.

The general syntax for assigning a variable in MAXScript is:

variable_name=variable_value

A variable_name starts with an alphabetic character or "_" (underscore), followed by any number of alphanumeric characters.

The variable_value can be a string, a number, or any other expression.

To assign a string to a variable:

To assign a new value to an existing variable:

Next Topic

Mathematical Operations in MAXScript