Jump to content

engineSetModelLODDistance Help


micheal1230

Recommended Posts

Posted

Why does'nt this work? Bear in mind im using this for custom mapped objects.

addEventHandler( "onClientResourceStart", getRootElement( ), 
for i = 550, 20000 do 
    engineSetModelLODDistance( i, 10000000 ) 
end 
) 

Posted

It may be because the distance parameter is too high and it trips its ass out (when it exceeds the bytes reserved for it, it becomes a negative value and then positive again and then negative, it's a shady area Example)

Try using 300 in 10000000's stead, that seems to be pretty acceptable:

For low LOD elements, engineSetModelLODDistance still has a limit of 300 units, but the actual draw distance used is 5 times the setting value. Also, low LOD elements ignore the 'Video' tab draw distance slider. So a setting of 200 will mean a low LOD element will always have a draw distance of 1000 units.
Posted
It may be because the distance parameter is too high and it trips its ass out (when it exceeds the bytes reserved for it, it becomes a negative value and then positive again and then negative, it's a shady area Example)

Try using 300 in 10000000's stead, that seems to be pretty acceptable:

For low LOD elements, engineSetModelLODDistance still has a limit of 300 units, but the actual draw distance used is 5 times the setting value. Also, low LOD elements ignore the 'Video' tab draw distance slider. So a setting of 200 will mean a low LOD element will always have a draw distance of 1000 units.

I get Loading script failed: showallshit\showallshit.lua:4:4 unexpected symbol near 'for' as a error

Posted

You forgot about:

function ( ) 

addEventHandler ( "onClientResourceStart", resourceRoot, 
    function ( ) 
        for i = 550, 20000 do 
            engineSetModelLODDistance ( i, 10000000 ) 
        end 
    end 
) 

Posted
You forgot about:
function ( ) 

addEventHandler ( "onClientResourceStart", resourceRoot, 
    function ( ) 
        for i = 550, 20000 do 
            engineSetModelLODDistance ( i, 10000000 ) 
        end 
    end 
) 

Crashes my mta every time i start the script and join

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