Page tree
Skip to end of metadata
Go to start of metadata



Introduced in

Version:1.43

Description

Description:Switches the draw mode of an object.

The possible draw modes are:

  • "normal": Regular visibility.
  • "transparent": Shows the Geometry LOD in transparent mode.
  • "wireframe": Shows the Geometry LOD as a wireframe.
  • "convexcomponent": Shows convex model components (within 60m of the camera) in a random variation of the specified color (V2.12+).
  • "view": Shows the ViewGeometry LOD that is specified in the lod parameter (see Alternative Syntax), and which can be "gunner", "pilot", or "cargo". The color parameter (see Alternative Syntax) is ignored in "view" mode (V3.7+).

Syntax

Syntax:object setDrawMode mode
Parameters:
  • object: Object - Affected object.
  • mode: String - See description for available modes.
Return Value:Nothing

Alternative Syntax

Syntax:object setDrawMode [mode,color,lod]
Parameters:
  • object: Object - Affected object.
  • mode: String - See description for available modes
  • color: Array - Can be either in the standard Color format, or receive two alpha parameters which specify the minimum and maximum transparency, depending on the camera angle (optional, default: [1,1,1,.2]).
  • lod: String - LOD to display (optional, default: "geometry").
Return Value:Nothing

Examples

Examples:
myObject setDrawMode "wireframe"  // wireframe model of the Geometry LOD is drawn
myObject setDrawMode ["transparent", [0, 1, 0, [0.2, 0.8]], "FIRE"] // green transparent model of the Fire LOD is drawn. Alpha varies in range from 0.2 to 0.8, based on the view angle


Some more examples:



Additional Information

See also: getDrawMode, diag drawmode
Multiplayer:
Problems:

Notes