So, I have a ball and I want the player to be able to make the ball jump. using the physics engine in the tutorial, how can i make my ball jump?

here is what i have so far. not using the physics i was able to make a character jump, which is why there is "fall_handling" and the trace. it can be ignored, i just kept it incase i need it.

///////////////////////////////////////////////////////////////////////////////
//jump_handling_phys()
///////////////////////////////////////////////////////////////////////////////
//uses: move_vec_x, move_vec_y, move_vec_z, fall_distance, jump_distance, fall, jump, player_force_z
function jump_handling_phys()
{
if(my.jump_distance > jump_height && my.jump == 1)
{
my.jump = 0;
my.player_force_z = 0;
my.jump_distance = 0;
}
else
{
if(my.jump == 1 && my.fall == 0)
{
if(my.player_force_z > jump_speed*time)
{
my.player_force_z -= jump_accel*time;
my.jump_distance += my.player_force_z;
}
else
{
my.player_force_z = jump_speed*time;
my.jump_distance += my.player_force_z;
}
}
}

}



//AND MY MOVEMENT ACTION
///////////////////////////////////////////////////////////////////////////////
//ACTION phys_move
///////////////////////////////////////////////////////////////////////////////
//uses: player_force_x, player_force_y, player_force_z, //uses: move_vec_x, move_vec_y, move_vec_z, fall_distance, jump_distance, fall, jump
action phys_move
{

player = me;
my.fall = 0;
my.jump = 0;

///////////////////////////////////////////////////////////////////////////////
//PHYSICS
///////////////////////////////////////////////////////////////////////////////
ph_setgravity(vector(0, 0, -386)); // set the gravity
phent_settype(player, PH_RIGID, PH_SPHERE); // set the physics entity type
phent_setmass(player, 3, PH_SPHERE); // and its mass
phent_setfriction (player, 80); // set the friction
phent_setdamping (player, 40, 40); // set the damping
phent_setelasticity (player, 50, 20); // set the elasticity
///////////////////////////////////////////////////////////////////////////////
while (1)
{

my.player_force_x = 180 * time * (key_cur - key_cul); // move the ball using the cursor keys
my.player_force_y = 180 * time * (key_cuu - key_cud); // 180 sets the x / y movement speeds
my.player_force_z = 0; // no need to move on the vertical axis
phent_addtorqueglobal (player, my.player_force_x); // add a torque (an angular force) to the ball

//FIND FALL DISTANCE
var trace_distance;
vec_set(temp,my.x);
temp.z -= 4000;
trace_mode = IGNORE_SPRITES + ACTIVATE_SONAR + USE_BOX; //set up trace()
my.fall_distance = trace(my.z, temp); //check how high i am and return the number

if(key_space)
{
my.jump = 1;
}
jump_handling_phys();





camera.x = player.x - 200; // keep the camera 300 quants behind the ball
camera.y = player.y; // using the same y with the ball
camera.z = player.z + 300; // and place it at z = 1000 quants
camera.tilt = -50; // make it look downwards



wait (1);
}



}