Jump to content

Mapping disappear


Emilio_M

Recommended Posts

Posted

Hi guys !

I want you today !

It is now several months that my objects disappear when I roll away ( not far ) see instead :

When it's correct : 74d70dae7bb43350bde99b79d57ccefc.png

When it's disappear : dfe01db4f9fa620fbc04883393c749e5.png

You see i'm not far.

I try to add this in client of sure :

    for k, obj in pairs(getElementsByType("object")) do 
        local model = getElementModel(obj) 
        engineSetModelLODDistance(model, 300) -- or try 1000 but not change 
    end 

I dont understand... I'm lost.

I want you ! and your help :D

Thank's all !

  • Moderators
Posted

how many objects are streamed in?

-- client 
outputChatBox(#getElementsByType("object",root,true)) 
-- 3 argument makes sure it only includes streamed in objects. 

  • Moderators
Posted

Lol, then it isn't strange that it doesn't load the object fully. I asume the col is loaded and the texture isn't.

Anyway I didn't know mta supported so much streamed in elements. o_O

You definedly executed this clientside?

  • MTA Team
Posted

That's not the amount of streamed in objects.

Use this:

  
count = 0 
objects = getElementsByType("object") 
  
for i = 1, #objects do 
    if isElementStreamedIn(objects[i]) then 
        count = count + 1 
    end 
end 
  
outputChatBox("Number of streamed-in objects: ".. count .." / ".. tostring(#objects)) 
  

Posted
how many objects are streamed in?
-- client 
outputChatBox(#getElementsByType("object",root,true)) 
-- 3 argument makes sure it only includes streamed in objects. 

The correct response is 191. I think 18164 was not correct and it's not correct. 191 is the correct value. Sorry for this mistake.

EDIT : Do you think it's because my object isnt stream ? I have a small portion of my mapping who was created with createObject function. The remaining is created by .map files including my mapping concerned.

Thanks all.

  • Moderators
Posted

Try a higher value then 300, so you are 100% sure it will be forcing the object to be visible.

A value 400 like will reduce the chance that it will drop lower then 300.

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