Jump to content

Mapped object's draw distance


FuriouZ

Recommended Posts

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

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...