This code (see below) will return the distance between the current entity and the camera. Just stick it in the action of the model with the material and change the material or what have you based on the distance.

vec_dist(my.x,camera.x);

For example:

if vec_dist(my.x,camera.x)<1000 {
// lod 0
}
else
{
if (vec_dist(my.x,camera.x)>1000)&&(vec_dist(my.x,camera.x)<5000) {
//lod 1
}
else
{
if (vec_dist(my.x,camera.x)>5000)&&(vec_dist(my.x,camera.x)<10000) {
//lod 2
}
else
{
//lod 3
}
}
}


Buy, Sell, & Archive Realtime 3D Content @ RedRock7.com *BETA* A5.5+ Plugin DLLs: GSADO, GSHTTP, GSImgLst, FreeMod, GSFlash, GSPython http://cellulear.slashbang.com/