Code:
///////////////////////////////////////////
//Include this wdl as the first include
//in your main script. After the path definitions.
//Then choose the action that you want to have the
//detain model properties and put detail_model();
//at the top of its action.
///////////////////////////////////////////
var DM_DistFromCam;
///////////////////////////////////////////
Var DM_Fade_Start = 2000;
Var DM_Fade_End = 2500;
///////////////////////////////////////////
Starter Fading
{
DM_Fade_End -= DM_Fade_Start;
}
///////////////////////////////////////////
function detail_model()
{
while(me)
{
DM_DistFromCam = vec_dist (my.x, camera.x);
My.alpha = 100 - ((DM_DistFromCam - DM_Fade_Start) / DM_Fade_End) * 100;
my.transparent = ((DM_DistFromCam - DM_Fade_Start) > 0);
wait(1);
}
}
///////////////////////////////////////////
little more optimized...
DM_Fade_Start and DM_Fade_End are to use like fog_start and fog_end...
have fun