Emilio_M Posted December 31, 2014 Posted December 31, 2014 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 : When it's disappear : 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 Thank's all !
Moderators IIYAMA Posted December 31, 2014 Moderators Posted December 31, 2014 how do you roll away? O_o anyway take a look at: https://wiki.multitheftauto.com/wiki/SetFarClipDistance
Emilio_M Posted December 31, 2014 Author Posted December 31, 2014 how do you roll away? O_o When i go further anyway take a look at: https://wiki.multitheftauto.com/wiki/SetFarClipDistance No it's doing nothing in client or server. Have you set a big scale to that object? No it's 1.
Moderators IIYAMA Posted December 31, 2014 Moderators Posted December 31, 2014 how many objects are streamed in? -- client outputChatBox(#getElementsByType("object",root,true)) -- 3 argument makes sure it only includes streamed in objects.
Moderators IIYAMA Posted December 31, 2014 Moderators Posted December 31, 2014 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 botder Posted December 31, 2014 MTA Team Posted December 31, 2014 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))
Moderators IIYAMA Posted December 31, 2014 Moderators Posted December 31, 2014 Of course it is, 3de argument: streamedIn: If true, function will only return elements that are streamed in. https://wiki.multitheftauto.com/wiki/GetElementsByType
MTA Team botder Posted December 31, 2014 MTA Team Posted December 31, 2014 Well, sorry for that, I never used that parameter 18.164 objects on one spot is very bad
Emilio_M Posted January 1, 2015 Author Posted January 1, 2015 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 IIYAMA Posted January 2, 2015 Moderators Posted January 2, 2015 What if that is the only object in your map? Will it still be invisible?
Emilio_M Posted January 2, 2015 Author Posted January 2, 2015 Yes it still visible i have already test that.
Moderators IIYAMA Posted January 2, 2015 Moderators Posted January 2, 2015 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.
Emilio_M Posted January 2, 2015 Author Posted January 2, 2015 of https://wiki.multitheftauto.com/wiki/SetFarClipDistance or engineSetModelLODDistance(model, 300) ?
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