You need to use the physics engine to do this:

Code:

float thrustX,thrustY;

...

void phys_ent()
{
ENTITY* pent= me;
phent_settype(me,PH_RIGID,PH_SPHERE);
phent_setmass(me,2,PH_SPHERE);
phent_setfriction(me,60);
phent_setelasticity(me,30,20);
phent_setdamping(me,40,30);
while(pent)
{
phent_addcentralforce(me,vector((thrustY * 1000) * (key_cur - key_cul),(-thrustX * 1000) * (key_cur - key_cul),0));
phent_addcentralforce(me,vector((thrustX * 1000) * (key_cuu - key_cud),(thrustY * 1000) * (key_cuu - key_cud),0));
thrustX= cos(-camera.pan);
thrustY= sin(camera.pan);
vec_set(temp,pent.x);
vec_sub(temp,camera.x);
vec_to_angle(camera.pan,temp);
wait(1);
}
}



This should allow you to control a ball physics entity with the arrow keys. The direction is always relative to the view (meaning forward is always away from the camera, backward is always towards the camera, etc.).

You may need to change a few things, like changing the "void" to "action" (if you want to attach it o an entity in WED), and changing the variable declaration if you're using C-Script (from "float thrustX,thrustY;" to "var thrustX; var thrustY;").


Code:
void main()
{
    cout << "I am MrCode,";
    cout << "hear me roar!";
    system("PAUSE");
}