Jump to content

Draw Distance for Objects


isa_Khamdan

Recommended Posts

Hello ,

Is it possible to set Draw Distance for Objects that have been created using MTA Map Editor?

And if yes can someone tell me how to set the draw distance?

engineSetModelLODDistance ( int model, float distance ) 

There is no example in the wiki , can you tell me how to do it for all objects I created in the map?

Link to comment

There is no example in the wiki , can you tell me how to do it for all objects I created in the map?

Well, just with the function arguments, you should find by yourself.

  
for i, v in ipairs(getElementsByType("object"))do 
    local model = getElementModel(v) 
    engineSetModelLODDistance(model, 1000) 
end 
  

Link to comment

There is no example in the wiki , can you tell me how to do it for all objects I created in the map?

Well, just with the function arguments, you should find by yourself.

  
for i, v in ipairs(getElementsByType("object"))do 
    local model = getElementModel(v) 
    engineSetModelLODDistance(model, 1000) 
end 
  

There is no difference at all nothings changed :S

Link to comment

Read the wiki .. it's say's very nice :

'Video' tab draw distance slider is 0% =>> 100 units

'Video' tab draw distance slider is 100% =>> 200 units

also say's that "engineSetModelLODDistance" has a limit of 300 units , so your 1000 units in the script will be foreced down to 300 units ............

Link to comment
Read the wiki .. it's say's very nice :

'Video' tab draw distance slider is 0% =>> 100 units

'Video' tab draw distance slider is 100% =>> 200 units

also say's that "engineSetModelLODDistance" has a limit of 300 units , so your 1000 units in the script will be foreced down to 300 units ............

I did read this part and I know about the limit and I changed the code to 300 Units but there still no effect in game?

I have an Extreme Large Map and I want to set a draw distance for it's objects so the player can see these objects from far so can anyone tell me how?

Else : Even setting them to 300 units didn't change anythings I didn't notice any changes in the draw distance.

Link to comment
  • 4 months later...

Hi isa_Khamdan,

You can use the 'Use LODs' option in the map settings, but this will only affect large objects like skyscrapers and mountains not the smaller objects.

I had requested in the bug tracker to increase the max range for engineSetModelLODDistance. They told me about the 'Use LODs' option and then closed the issue. I had no chance to explain them that this does not work for small or medium sized objects.

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