function animate_for_fog()
{
wait(-integer(random(3)));
my.frame =0;
while (1)
{
my.frame += 0.6*time_step;
if (my.frame >= 32) { my.frame = 1; }
wait(1);
}
}
void autofog()
{
..........
animate_for_fog();
if(integer(random(10))>5)
{
vec_scale(my.scale_x, 7.8);
}
else
{
vec_scale(my.scale_x, random(4));
}
..........
}
void generate_fog()
{
..........
if(randint == 0){ ent_create("dust+32.tga", pos_place, autofog); }
if(randint == 1){ ent_create("dustdense+32.tga", pos_place, autofog); }
..........
}