spoty Posted June 3, 2016 Share Posted June 3, 2016 heloo i wanted to ask if its possible to remove whole world and make new one with costum models but can i make the costum models like original models that you can see from a far distance if it can would you mayby explain me how and or wich functions to make script becous with setModelLODDistance its like showing part of map on lastmoment when you want to enter it even if i maxed the distance Link to comment
Captain Cody Posted June 4, 2016 Share Posted June 4, 2016 https://wiki.multitheftauto.com/wiki/SetLowLODElement *Hint* *Hint* If your models are optimized enough you can use the same id for both the low lod and the original model without lag.' for i,v in pairs getElementsByType("object",resourceRoot) do local x,y,z = getElementPosition(v) local xr,yr,zr = getElementRotation(v) setLowLODElement(v,createObject ( getElementModel(v), x,y,z,xr,yr,zr,true ) end Link to comment
Bean666 Posted June 5, 2016 Share Posted June 5, 2016 codyL's code have few errors so i edited his script and tested and it works local objects = getElementsByType("object") for i, v in ipairs(objects) do local x,y,z = getElementPosition(v) local xr,yr,zr = getElementRotation(v) setLowLODElement(v,createObject ( getElementModel(v), x,y,z,xr,yr,zr,true ) ) end Link to comment
spoty Posted June 8, 2016 Author Share Posted June 8, 2016 codyL's code have few errorsso i edited his script and tested and it works local objects = getElementsByType("object") for i, v in ipairs(objects) do local x,y,z = getElementPosition(v) local xr,yr,zr = getElementRotation(v) setLowLODElement(v,createObject ( getElementModel(v), x,y,z,xr,yr,zr,true ) ) end can i just add this to my map.lua or to my object replace script? sorry i am just confused about how to properly use it thanks Link to comment
Captain Cody Posted June 8, 2016 Share Posted June 8, 2016 At the end of your map.lua Link to comment
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