i figured it out.

instead of having the pXent_addvelcentral(ball, ball_jump); in the while loop i added pXent_addvelcentral(ball, vector(0, 0, 300)); to the jump function and now it works like it should grin and then the redux function wasnt needed anymore so now the code is shorter too.

thanks for the help