EDIT: shit too late -.-
I tried to code something, not tested, hope it works ^^
var gravity=0;
var my_height=0;
function gravityandjumps()
{
my_height = c_trace(my.x,vector(my.x,my.y,my.z-10000),USE_BOX|IGNORE_PASSABLE|IGNORE_ME);
if(my_height > 5) { //if I'm flying
my.z-=gravity*time_step; //push me down
gravity+=1*time_step;} //realistc falling
else
if(my_height < 4) //if I'm going uphill
{my.z-= my_height-4.5;} //push me up
else //else
{gravity=0; //set gravity on zero
if(key_space) //if you will jump
{my.z+=3*time_step; //push me up
gravity=-20;} //and set the gravity on -20
}
}
Last edited by hopfel; 02/21/10 11:02.