Template:ObjectLODInfo: Difference between revisions
Jump to navigation
Jump to search
Fernando187 (talk | contribs) No edit summary |
Fernando187 (talk | contribs) No edit summary |
||
Line 19: | Line 19: | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
txdLOD = engineLoadTXD( "garageLOD.txd" ) | txdLOD = engineLoadTXD( "garageLOD.txd" ) | ||
dffLOD = engineLoadDFF( "garageLOD.dff" | dffLOD = engineLoadDFF( "garageLOD.dff" ) | ||
engineImportTXD( txdLOD, modelIdLOD ) | engineImportTXD( txdLOD, modelIdLOD ) | ||
engineReplaceModel( dffLOD, modelIdLOD ) | engineReplaceModel( dffLOD, modelIdLOD ) | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 12:41, 4 November 2024
This template is used on object/building/models/LOD related pages.
Important info about Object LOD (Level of Detail)
(To determine the LOD model ID, use the editor resource, or refer to this this table)
If the model has a LOD version that you want to remove from the default map:
local modelIdLOD = 13245 removeWorldModel ( modelIdLOD, 100, x,y,z )
Optionally, create a MTA LOD replacement so there is no hole in the map from a far distance:
objLOD = createObject( modelIdLOD, x,y,z, 0, 0, 0, true ) setElementParent(objLOD, obj) -- so the LLOD element is destroyed with the HLOD element setLowLODElement(obj, objLOD) -- make the LOD assignment
You may load a custom model to use as a LOD:
txdLOD = engineLoadTXD( "garageLOD.txd" ) dffLOD = engineLoadDFF( "garageLOD.dff" ) engineImportTXD( txdLOD, modelIdLOD ) engineReplaceModel( dffLOD, modelIdLOD )