Heres a commented example for you...
Code:
vec_set(temp, my.x); // makes it so temp is always starts at my.x
temp.z -= 4000; // set how far to trace
trace_mode = ignore_me+ignore_sprites+ignore_models; // sets the trace
air = trace(my.x, temp); // see's if player will hit ground sometime
if(air > 3) //if the player is still in the air
{
force = -12 * time; // sets how fast you fall
}
else
{
force = 0; // makes sure you dont fall anymore
}
So just have your player_speed.z value to equal force. Hope that helps