Sure. Here it is slightly modified and noted so you know whats what.

var move_vec[3] = 0,0,0; //movement vectors
var jumping = 0;
var lives = 3;

action players_vehicle
{
player = me;
my.shadow = on;
my.grav_acc = 3; //acceleration for gravity
my.res = 0; //not sure what this is for. left it in for the heck of it
while (lives > 0)
{
vec_set(temp.x, my.x); // copies entity x/y/z/ to the temp vector
temp.z -= 99999; // we set the temp vector ? quants straight down, below the entity
result = c_trace(my.x,temp.x,IGNORE_ME|IGNORE_PASSABLE|USE_BOX|USE_POLYGON|IGNORE_PUSH); // do a trace and make result = to the found value

if(result > 0) // chech to see if an obstacle was hit, if so start the falling action
{
move_vec.z -= my.grav_acc*time; // fall
my.res = -0;
}
if((result < 10) && (result > 0)) // check to see if the entity is on the ground, if so stop falling. This is the number to change if your entity floats on above the ground
{
move_vec.z = 0;
my.res = -0;
}
if((result < 1) && (result >0)) // check if entity is below ground (fallen through) if so rise up. Also a number to play with if your entity floats above the ground or double jumps. Should never be larger than the above number
{
move_vec.z += 10*time;
my.res = -0;
}


if (move_vec.z == 0) //so player can't double jump. Jump is over so reset to allow jumping again
{
jumping = 0;
}

if (key_j && jumping != 1) //if j key and player isnt in a jump let'em jump
{
jumping = 1; //keep'em from double jumping
move_vec.z += 95*time; // jump

}

move_vec = (key_cur + key_cul)*30 *time; //how far to move on the x axis
if (key_cur == 1){my.pan = 0;} //change pan depending on which key is pressed
if (key_cul == 1){my.pan = 180;}

c_move(me, move_vec, nullvector,IGNORE_PASSABLE|GLIDE); //actual movement
player_animate(); //go handle animations
handle_camera(); //go handle camera
wait(1);
}
}

Hope this helps ya out.


Just Because Your Paranoid Doesn't Mean They Aren't After You...Because They Really Are

http://spearbang.awardspace.com/news.php