Here is your altered code which I have verified works:
action phys
{
var earthGravity[3];// = 0,0, -386;
earthGravity[0] = 0;
earthGravity[1]=0;
earthGravity[2]=-386;
phent_settype(my, PH_RIGID, PH_ball);
ph_setgravity(earthgravity);
}
Here is some code to make the entity act more like a ball.
action physicsBall
{
var earthGravity[3];// = 0,0, -386;
earthGravity[0] = 0;
earthGravity[1]=0;
earthGravity[2]=-386;
phent_settype(me, PH_RIGID, PH_SPHERE);
phent_setfriction (me,100);
phent_setelasticity ( me, 50, 0 );
ph_setgravity( earthgravity );
}
Notice I have made the variable earthGravity a local variable. You may wish to make it global but this allows you to simply cut and paste the code.