TranslatableArtPart
(For high level concepts about how to use Lua to write scripted tasks, please see VR-Forces User's Guide.)
The TranslatableArtPart is a class of Lua object that represents a translating articulated part. The functions defined below are methods available for this class of object.
Lua scripts cannot create TranslatableArtParts, but if an entity uses a translating articulated part actuator in one of its systems, then that actuator is automatically defined for the script. The name of the object in the Lua environment is the name of the component, found in the data file (e.g. a .sysdef file).
Example: in the periscope.sysdef file describing a set of periscope devices, there is a periscope actuator with component-type = "translatable-part-actuator." The name of this component in the system is "periscope." Thus a Lua script could call
periscope:raise()
to raise the periscope.
Function List
| backward () | Starts the process of translating the art part in a negative Y direction. |
| forward () | Starts the process of translating the art part in a positive Y direction. |
| isFullyTranslatedToMaximum () | Returns true if the art part is fully translated to the maximum range |
| isFullyTranslatedToMinimum () | Returns true if the art part is fully translated to the maximum range |
| left () | Starts the process of translating the art part in a negative X direction. |
| lower () | Starts the process of translating the art part in a negative Z direction. |
| pause () | Pauses translating of art part. |
| paused () | Returns true if art part motion is paused |
| raise () | Starts the process of translating the art part in a positive Z direction. |
| resume () | Resumes translating of art part |
| right () | Starts the process of translating the art part in a positive X direction. |
| state () | Returns the current state of the art part 1 - Being lowered 2 - Being raised 3 - Being moved left 4 - Being moved right 5 - Being moved forward 6 - Being moved backward |
| stop () | Stops translating of art part. |
Functions
- backward ()
- Starts the process of translating the art part in a negative Y direction. Check isFullyTranslatedToMinimum to see when art part is fully translated
- forward ()
- Starts the process of translating the art part in a positive Y direction. Check isFullyTranslatedToMaximum to see when art part is fully translated
- isFullyTranslatedToMaximum ()
- Returns true if the art part is fully translated to the maximum range
- isFullyTranslatedToMinimum ()
- Returns true if the art part is fully translated to the maximum range
- left ()
- Starts the process of translating the art part in a negative X direction. Check isFullyTranslatedToMinimum to see when art part is fully translated
- lower ()
- Starts the process of translating the art part in a negative Z direction. Check isFullyTranslatedToMinimum to see when art part is fully translated
- pause ()
- Pauses translating of art part. Call resume to resume translating
- paused ()
- Returns true if art part motion is paused
- raise ()
- Starts the process of translating the art part in a positive Z direction. Check isFullyTranslatedToMaximum to see when art part is fully translated
- resume ()
- Resumes translating of art part
- right ()
- Starts the process of translating the art part in a positive X direction. Check isFullyTranslatedToMaximum to see when art part is fully translated
- state ()
- Returns the current state of the art part 1 - Being lowered 2 - Being raised 3 - Being moved left 4 - Being moved right 5 - Being moved forward 6 - Being moved backward
- stop ()
- Stops translating of art part. Will need to call translateUp or translateDown to restart process from last position
