for falling etc...

Code:
var ground_dist;
var fall_limit = 1000;
ground_dist = c_trace(my.x,vector(my.x,my.y,(my.z - fall_limit)),IGNORE_ME|IGNORE_PASSABLE);
 if(ground_dist > 5)//adjust if needed
 {
  player.z -= 100 * time_step;//falling, adjust as well.
 }


///stick to ground
VECTOR temp;
 vec_set(temp,my.x);
 temp.z -= 1000;
 c_trace(my.x,temp,IGNORE_ME|IGNORE_PASSABLE);

 if(trace_hit)
 {
   vec_set(my.x,hit.x);
 }




Everybody Poops.
here are some tutorials I made.
http://www.acknexturk.com/blender/