Posted By: Marky Mark
progressive alpha - 07/15/06 00:25
how to do a model appear progressivly? I have a model and I want it to take 30 sec before reaching 100 of alpha... how to do this?
function super_slow_fadein()
{
var total_time = 0;
while(1)
{
total_time += time;
entity.alpha = 48000/total_time;
wait(1);
}
}
function super_slow_fadein()
{
var total_time = 0;
while(1)
{
total_time += time;
my.alpha = 960/total_time; //480 = nb de sec * 16 tick in 1 sec
wait(1);
}
}
action formation {
super_slow_fadein();
}
action super_slow_fadein()
{
my.skill1 = 0;
while(my.alpha < 100)
{
my.skill1 += time;
my.alpha = 96000/my.skill1;
wait(1);
}
my.alpha = 100; // full opacity is set only when while loop becomes false
}
action super_slow_fadein()
{
my.skill1 = 0;
my.transparent = on;
my.alpha = 0;
wait(1); // first frame is completely invisible
while(my.alpha < 100)
{
my.skill1 += time;
my.alpha = 96000/my.skill1;
wait(1);
}
my.alpha = 100; // full opacity is set only when while loop becomes false
}
function formation()
{
my.skill1 = 0;
my.transparent = on;
my.alpha = 0;
wait(1); // first frame is completely invisible
while(my.alpha < 100)
{
my.skill1 += time;
my.alpha = 96000/my.skill1;
wait(1);
}
my.alpha = 100; // full opacity is set only when while loop becomes false
}
Action formation
{
my.transparent = on;
my.alpha = 0;
}
on_f = formation();

function formation()
{
my.skill1 = 0;
my.transparent = on;
my.alpha = 0;
wait(1); // first frame is completely invisible
while(my.alpha < 100)
{
my.skill1 += time;
my.alpha = 96000/my.skill1;
wait(1);
}
my.alpha = 100; // full opacity is set only when while loop becomes false
}
Action formation_act
{
my.transparent = on;
my.alpha = 0;
while(me)
{
if(key_f)
{
while(key_f) { wait(1); }
formation();
}
wait(1);
}
}
Quote:
okAY no errors but no fade in... did you tried it? I placed a simple model in front of me when I start to test it...
while(my.alpha < 100)
{
my.skill1 += time_frame;
my.alpha = (my.skill1/(30*16)) * 100;
wait(1);
}

. Plus, it's my.skill1 += time, not my.skill1 += time_frame. For 6.40.5 and later, it's my.skill1 += time_step.Quote:
it's my.skill1 += time, not my.skill1 += time_frame. For 6.40.5 and later, it's my.skill1 += time_step.