VR-Forces 5.0.3 Lua Function Documentation

ExtendableArtPart

(For high level concepts about how to use Lua to write scripted tasks, please see VR-Forces User's Guide.)

The ExtendableArtPart is a class of Lua object that represents a rotating articulated part. The functions defined below are methods available for this class of object.

Lua scripts cannot create ExtendableArtParts, but if an entity uses a extendable 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 fixed-wing-fighter-jet.sysdef file describing a fixed-wing movement system, there is a landing gear actuator with component-type = "extendable-part-actuator." The name of this component in the system is "landinggear." Thus a Lua script could call
landinggear:open()
to lower the landing gear.

Function List

extend () Starts the opening of the articulated part at the specified rate (m/sec)
extend () Starts the opening of the articulated part at the specified rate (m/sec)
isExtended () Returns true if the art part is extended
isRetracted () Returns true if the art part is retracted
reset () Resets the state of the art part to NoState to allow other controllers to control art part
retract (rate) Starts the retraction of the articulated part at the specified rate (m/sec)
retract (rate) Starts the retraction of the articulated part at the specified rate (m/sec)


Functions

extend ()
Starts the opening of the articulated part at the specified rate (m/sec)
extend ()
Starts the opening of the articulated part at the specified rate (m/sec)
isExtended ()
Returns true if the art part is extended
isRetracted ()
Returns true if the art part is retracted
reset ()
Resets the state of the art part to NoState to allow other controllers to control art part
retract (rate)
Starts the retraction of the articulated part at the specified rate (m/sec)

Parameters:

  • rate:
retract (rate)
Starts the retraction of the articulated part at the specified rate (m/sec)

Parameters:

  • rate:

Copyright© 2023 MAK Technologies, Inc. All rights reserved.