setLowLODElement | Multi Theft Auto: Wiki Skip to content

setLowLODElement

Client-side
Server-side
Shared

Pair: getLowLODElement

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function assigns a low LOD element to an element. The low LOD element is displayed when its associated element is not fully visible. If a low LOD element is assigned to several elements, it will be displayed when any of these elements are not fully visible.

Note

The only valid elements types for assigning LODs with this function are Object and Building .

Syntax

setLowLODElement ( )

Code Examples

server

This example shows how to create and link a normal and low LOD object:

-- Create a normal object
local objNormal = createObject ( 3620, x,y,z,0,0,0 )
-- Create a low LOD object
local objLowLOD = createObject ( 5154, x,y,z,0,0,0,true )
-- Assign the LOD object with the Normal object
setLowLODElement ( objNormal, objLowLOD )
-- Set the LOD object's parent to the Normal object so it is destroyed together
setElementParent( objLowLOD, objNormal )
-- Set the draw distance for the model we are using for low LOD to maximum
engineSetModelLODDistance ( 5154, 300 )

See Also

Element Functions