Here, note that I commented in the first while(1) loop. I also changed player to raincurtain, because this is the entity that generates the particles that is moving. I want the particles to follow this invisible entity, not the player.
I get no errors, but its not moving...
Code:
entity* raincurtain;
action cloud_object
{
raincurtain = me;
my.skill1 = 0;
my.alpha = 98;
my.transparent = on;
//while(1)
//{
//MOVEMENT
// NOTE: LAISSER LE CHIFFRE AVANT TIME_STEP PAREIL POUR TOUTES LES ACTIONS DE L'ORAGE.
while(picked_angle == 0) { wait(1); } // wait until choose_way has run
my.pan = picked_angle;
while(1)
{
temp.x = 2*time_step; // change 5 to whatever speed you want
temp.y = 0;
temp.z = 0;
c_move(me,temp,nullvector,null);
wait(1);
}
// generate cloud particals once
while (my.skill1 < ent_vertices(my)) // repeat till all vertices are passed
{
my.x = raincurtain.x;
my.y = raincurtain.y;
my.z = raincurtain.z;
//clou();
vec_for_vertex(temp.x,me,my.skill1);
if (temp.z < my.z)
{
temp.z -= random(20); //temp.z -= random(20);
temp.y += random(120)-60; //temp.y += random(120)-60;
temp.x += random(20)-10; //temp.x += random(20)-10;
effect(dark_cloud,1,temp,nullvector);
}
if (temp.z < my.z-200)
{
temp.z += random(20);
temp.y += random(120)-60; //temp.y += random(120)-60;
temp.x += random(10)-5;
effect(mid_cloud,1,temp,nullvector);
}
if (temp.z > my.z)
{
temp.z += random(20);
temp.y += random(120)-60; //temp.y += random(120)-60;
temp.x += random(10)-5;
effect(light_cloud,1,temp,nullvector);
}
my.skill1 += 1;
}
//my.skill1 = 0;
// wait(1);
//}
}