looking for suggestions. I am trying to get a box aka ball from lite-c tutorials to kind of hover and bob up and down slightly like a lottery ball in air popper.
What I have so far is below. I think I get an intial z force of 3710 but then nothing. I thought by alternating a zforce value and loop it. It would work. Any ideas for solving this problem?

#include <acknex.h>
#include <default.c>
#include <atypes.h>

VECTOR box_force;
ENTITY* box;
var a;

action balance()
{

while(1)
{
a = integer(random(2));
if(a == 1)
{
box_force.z = 0;
}
else
{
box_force.z = 3710;//initial jolt of vertice force comes from here I believe
}
wait(-1);
}

}

function main()
{

level_load("roller.wmb");//
box = ent_create("box.mdl", vector(-386, 0, 100), balance); // create the ball
/////////////////////////////////////////////////////////////////////////////////
ph_setgravity (vector(0, 0, -200)); //this line makes the ball drop
phent_settype(box, PH_RIGID, PH_BOX);//fine
phent_setmass(box, 2, NULL);//fine
phent_addcentralforce (box, box_force);
camera.x = 300;
camera.y = 300;
camera.z = 300;
camera.tilt = -20;
camera.pan = 214;

}