The Envelope() constructor takes three arguments, the last of which is optional:
The <name> argument is a string identifier for the new envelope. The <type> value is one of CHAN_NUMBER,CHAN_DISTANCE, CHAN_PERCENT, or CHAN_ANGLE.The optional <group> argument is a string value that identifies the group within which the new envelope will reside. If the <group> indicated does not already exist, LScript will create it.
This Object Agent shares the same methods and data members as those just added to the Channel Object Agent. In addition, it provides the following Envelope-specific methods
This method will copy into the instance the values found in the provided Envelope Object Agent.
The contents and settings of the Envelope will be displayed to the user for their interaction.
These two methods are used to stream the Envelope's settings and data into and out of the scene file. They are context-sensitive, meaning that they can only be called during those particular phases of Layout--i.e., the save() method can only be invoked from the save() UDF, and the load() method can only be invoked from within the load() UDF. Hellfire and damnation shall be your earthly reward should you attempt to use them outside of their respective context.
Envelopes (and groups) generated by your script are automatically destroy by LScript when your script terminates. You can cause them to remain in Layout's internal channel group listing by calling this method. If called without arguments, the Envelope will be flagged as persistent. A Boolean 'false' value will allow the Envelope to be removed by LScript at script termination.