Faw[Ful] Posted April 25, 2016 Share Posted April 25, 2016 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now