action theBall()
{
while(!player) wait(1);
set(my, SHADOW);
phent_settype(my, PH_RIGID, PH_SPHERE);
phent_setmass(my, 1, PH_SPHERE);
phent_setfriction(my,90);
phent_setelasticity(my,75,100);
phent_setdamping(my,30,5);
phent_addvelcentral(my,vector(10,10,0));
ph_setgravity(vector(0,0,-500));
my.emask |= ENABLE_FRICTION;
while(1){
dist = vec_dist(my.x, player.x);
if(key_w || key_a || key_s || key_d){
move_with_ball();
}
if(key_x){
kick();
}
wait(1);
}
}