|
|
| (3 intermediate revisions by the same user not shown) |
| Line 1: |
Line 1: |
| <noinclude>This template is used on object/building/models/LOD related pages. <hr></noinclude>
| | {{Delete|Template not needed}} |
| == [[File:Dialog-warning.svg|48px]] Important info about Object LOD (Level of Detail) ==
| |
| | |
| ''(To determine the LOD model ID, use the editor resource, or refer to this [https://github.com/multitheftauto/mtasa-resources/blob/master/%5Beditor%5D/editor_main/server/mapEditorScriptingExtension_s.lua#L78 this table])''<br/>
| |
| If the model has a LOD version that you want to remove from the default map:
| |
| <syntaxhighlight lang="lua">
| |
| local modelIdLOD = 13245
| |
| removeWorldModel ( modelIdLOD, 100, x,y,z )
| |
| </syntaxhighlight>
| |
| | |
| Optionally, create a MTA LOD replacement so there is no hole in the map from a far distance:
| |
| <syntaxhighlight lang="lua">
| |
| 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
| |
| </syntaxhighlight>
| |
| | |
| You may load a custom model to use as a LOD:
| |
| <syntaxhighlight lang="lua">
| |
| txdLOD = engineLoadTXD( "garageLOD.txd" )
| |
| dffLOD = engineLoadDFF( "garageLOD.dff", 0 )
| |
| engineImportTXD( txdLOD, modelIdLOD )
| |
| engineReplaceModel( dffLOD, modelIdLOD )
| |
| </syntaxhighlight>
| |