FuriouZ Posted November 2, 2014 Share Posted November 2, 2014 Hello! Is there way to set mapped objects draw distance same as original world have ? Without converting .map to .lua. Link to comment
-.Paradox.- Posted November 2, 2014 Share Posted November 2, 2014 EngineSetModelLODDistance ? EngineSetModelLODDistance Link to comment
FuriouZ Posted November 2, 2014 Author Share Posted November 2, 2014 EngineSetModelLODDistance ? EngineSetModelLODDistance I'm afraid that it doesn't work with mapped objects, but I'll try Link to comment
Enargy, Posted November 2, 2014 Share Posted November 2, 2014 maybe you can use some like this for i, v in ipairs(getElementsByType("object")) do local model = getElementModel(v) engineSetModelLODDistance(model, float distance) end Link to comment
-.Paradox.- Posted November 2, 2014 Share Posted November 2, 2014 That's the code from wiki page :b Link to comment
DakiLLa Posted November 3, 2014 Share Posted November 3, 2014 I'd solve it in the next way: 1) Get all objects IDs that you want to rise draw distance (make a table of them) local obj_ids = { "object (palm_ls) (1)", "object (rock) (1)", ... } 2) Loop through all IDs and use createObject function for creating LOD objects on top of each default object, like this: for i, id in ipairs( obj_ids ) do local object = getElementByID( id ) if object then local x, y, z = getElementPosition( object ) local rx, ry, rz = getElementRotation( object ) createObject( getElementModel( object ), x, y, z, rx, ry, rz, true ) --the last argument tells us it is LOD object end end 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