Jump to content

Help with LowLOD Element


Faw[Ful]

Recommended Posts

I did a script to create lowLOD Elements based on the objects placed in the map editor.

local vdist = 300 -- LOD view distance, max 300 
local ids={ {4564, 4113}, {1701, 1747} } -- Normal model id first Lod second 
  
  
function createLowLod() 
    for key,target in ipairs(getElementsByType("object"),true) do 
     
    if getElementModel ( target ) == ids[1][1] then 
    local px,py,pz = getElementPosition(target) 
    local createobj = createObject ( ids[1][2], px,py,pz ) 
    setLowLODElement ( target, createobj ) 
    attachElements ( createobj, target ) 
    engineSetModelLODDistance ( ids[1][2], vdist ) 
    end 
end 
end 
  
--Set Function 
createLowLod() 

So all the model ID 4564 in the map editor will get the model ID 4113 as the LowLOD when the map start.

I can see both objects at the same place, but the LowLOD dont have extra draw distance as its suppose to :/

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...