This is giving me strange results. This is what I put in my code:
Code:
while (my.z > -1000 && my.s_alive && clear_time == 0)
{
phent_getvelocity(my, temp, nullvector);
if((temp.x*temp.x+temp.y*temp.y+temp.z*temp.z)<10)
{
my.skill30+=1;
if(my.skill30>50)
{
// breakpoint;
my.bright=on;
my.metal=off;
temp.x = 0;
temp.y = -(my.y * 1000); //push up and towards middle of playing field
temp.z = spring_min;
phent_addforcelocal(my,temp,nullvector);
my.skill30=1;
}
}
wait (1);
}
I set the metal flag off and the bright flag on so that I could see balls whose skill30 made it to 50.
Now it looks very funny, because the balls usually get about 2/3 down the screen before popping like corn.
I've tried changing the values on this line:
Code:
if((temp.x*temp.x+temp.y*temp.y+temp.z*temp.z)<10)
to < 200 and <-2000, but it doesn't make much difference.
I don't understand physics very well, so can someone please explain this? The balls should come to rest/near rest/get stuck for a little time before they pop.