Hello,

I'm using the smoke code from Aum60 (As it's exactly what I'm looking for), but there is something wrong with it!



Code:
function fade_smoke()

{

       my.alpha -= 0.15 * time; // particle fading speed

       if (my.alpha < 0) {my.lifespan = 0;}

}

 

function smoke_effect()

{
	    my.bmap = smoke;
	    
       temp.x = random(1) - 0.5; // move a bit on the x

       temp.y = random(1) - 0.5; // and y axis

       temp.z = random(2); // but always move upwards on the z axis

       vec_add (my.vel_x, temp);

       my.alpha = 10 + random(20);

       my.size = 5; // size of the smoke

       my.bright = on;

       my.move = on;

       my.lifespan = 50; // lifespan for the smoke particles

       my.function = fade_smoke;

}

 

starter generate_smoke()

{

       while (diamond == null) {wait (1);}

       while (1)

       {

               vec_for_vertex (temp, diamond, 2617); // generate smoke from the 246th vertex on the player model

               effect (smoke_effect, (2 / (time_step + 0.1)), temp.x, normal);

               wait (1);

       }

}


I can't think of something, it should work shocked


A7 7.77