Wao, i just find my bug. I add this line :
ent_remove(my);
in the end of the action sphere and now it work fine; this is the good script:
var earthgravity[3] = 0,0, -386;
function emit_sphere(); //prototype of the function
action sphere
{
my.shadow=on;
ph_setgravity( earthgravity );
phent_settype(my, PH_RIGID, PH_SPHERE);
phent_setmass(my, 5, PH_SPHERE);
phent_setfriction(my, 70);
phent_setelasticity(my, 50, 10);
phent_setdamping(my, 20, 20 );
temp.x=cos(camera.pan)*cos(camera.tilt)*300000; temp.y=sin(camera.pan)*cos(camera.tilt)*300000;
temp.z=sin(camera.tilt)*300000;
phent_addforcelocal(my,temp,nullvector);
on_mouse_left=null;
sleep(5);
on_mouse_left=emit_sphere;
ent_remove(my);
}
string mdl_sphere=<roue.wmb>;
function emit_sphere()
{
temp.x=camera.x+cos(camera.pan)*cos(camera.tilt)*100;
temp.y=camera.y+sin(camera.pan)*cos(camera.tilt)*100;
temp.z=camera.z+sin(camera.tilt)*100;
temp.z=camera.z+sin(camera.tilt)*100;
ent_create(mdl_sphere,temp,sphere);
}
on_mouse_left=emit_sphere;
One more time , great thanks to Ventilator.