Jump to content

Replacing low LOD elements


UnchiuDawg

Recommended Posts

EDIT: I just realised my mistake from here: https://wiki.multitheftauto.com/wiki/Element/Object 

I suppose the only way to do this is to rebuild the entire map. I guess you could close this topic.

 

Hi, I've been trying to replace the low LOD elements of the entire map objects from the low resolution ones to the normal ones by using setLowLODElement.

I've tried to do it in many ways (which I figured out were wrong after reading more on the wiki about each function I tried to use). I don't think it's worth explaining what I tried since I'm very new to scripting and it might seem very dumb/not worth your time to read.

I just don't know how to get the elements of the map objects (buildings, trees, roads, hills, etc.). The last thing I tried was using getElementsByType, but I still couldn't figure it out.

This is the last thing I tried on serverside:

function replaceLODall(source, plzwork)
	for k,v in ipairs( getElementsByType("object") ) do
		setLowLODElement ( v, v )
	end
end

addCommandHandler ("lolcommand", replaceLODall)

I've looked on the forums to check if anybody else tried this and also looked for a resource that does this, but I couldn't find any. If you're wondering why I'm trying to do this, it's because engineSetModelLODDistance is limited, and I want to see the proper model from far away (and also to see a model for those objects that lack a low LOD).

I appreciate any help :D

 

Edited by UnchiuDawg
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...