A thank you from me also. Just few questions to Loopix:

Have you replaced trace with c_trace and also did something to the collision? ATM i'm using the default USE_AABB from KH Movment tutorial, because if i'd use something else I get strange results. If I keep using USE_AABB all is fine as long if you dont step onto another model, then it push the player upwards.

Below is the half finished movement script from kh movement tutorial. Loopix ff you have some spare time can you look at your c_trace and c_move and tell me if they use USE_AABB, or maybe explain me how you fixed the collission problem with mdls and such?

Code:
#include <acknex.h>

#define nullframe -2
#define blend -1
#define stand 0
#define run 1
#define walk 2
#define jump 3
#define fall 4

#define move_x skill22 // movement skills
#define move_y skill23
#define move_z skill24
#define force_x skill25
#define force_y skill26
#define force_z skill27
#define velocity_x skill28
#define velocity_y skill29
#define velocity_z skill30

#define animate skill31
#define animate2 skill32
#define animblend skill33
#define currentframe skill34
#define blendframe skill35

#define z_offset skill50
#define jumping_mode skill51
#define gravity skill52
#define movement_mode skill53
#define moving skill54
#define hit_by_player skill55
#define entity_type skill56

var space_press = 0;

function handle_animation(animation_speed);
function rotate_entity(rotate_angle,rotate_speed);

function rotate_entity(rotate_angle,rotate_speed)
{
// result replaced by var rotate_result to prevent conflicts
// ..
var rotate_result;

if (my.pan == rotate_angle) { return; }
rotate_result = ang(rotate_angle - my.pan);
if (rotate_result > 0){
c_rotate(my,vector(rotate_speed * time_step,0,0),IGNORE_PASSABLE);
}
if(rotate_result < 0){
c_rotate(my,vector(-rotate_speed * time_step,0,0),IGNORE_PASSABLE);

}
if (ang(rotate_angle - my.pan) < 0 && rotate_result > 0){
c_rotate(my,vector(rotate_angle - my.pan,0,0),IGNORE_PASSABLE);
}
if (ang(rotate_angle - my.pan) > 0 && rotate_result < 0){
c_rotate(my,vector(rotate_angle - my.pan,0,0),IGNORE_PASSABLE);
}
}

function handle_gravity()
{
//IGNORE_ME|IGNORE_PASSABLE|USE_AABB|USE_BOX
//IGNORE_ME|IGNORE_PASSABLE|USE_POLYGON
//IGNORE_ME|IGNORE_PASSABLE
result = c_trace(vector(my.x,my.y,my.z-6),vector(my.x,my.y,my.z -4000),IGNORE_ME|IGNORE_PASSABLE|USE_AABB|USE_BOX);

if(result < 3) // def: 3
{
if(my.jumping_mode == 0)
{
my.force_z = -1 * result; // def: force_z = -1;
if(key_space == 0 && space_press == 1)
{
space_press = 0;
}
if(key_space == 1 && space_press == 0 && my.animblend >= stand && my.animblend != jump && my.animblend != fall)
{
space_press = 1;
my.jumping_mode = 1;
my.force_z = 25; //25
my.blendframe = jump;
my.animate2 = 0;
my.animblend = blend;
}
}

if(my.jumping_mode == 2 || my.jumping_mode == 3)
{
my.jumping_mode = 0;
}
}
else
{
if(my.jumping_mode == 2)
{
if(result > 120)
{
my.animate = 60;
my.jumping_mode = 3;
}
else
{
my.jumping_mode = 0;
}
}

if(my.jumping_mode == 3 && result <= 120) // def: 120
{
my.jumping_mode = 0;
}
if(my.jumping_mode == 0)
{
if(result > 120 && my.animblend >= stand && my.animblend != jump && my.animblend != fall)
{
my.jumping_mode = 3;
my.blendframe = fall;
my.animate2 = 0;
my.animblend = blend;
}
}
my.force_z -= 6 * time_step;
my.force_z = maxv(-30,my.force_z); // def: maxv(-30,my.force_z);
}

my.velocity_z += (time_step * my.force_z) - (minv(time_step*0.7,1) * my.velocity_z);
my.move_z = my.velocity_z * time_step;
}

function handle_movement()
{
VECTOR temp;
temp.x = -1000; // def: temp.x = -1000;
temp.y = 0;

if(key_w == 1 && key_s == 0 && key_a == 0 && key_d == 0) { temp.x = camera.pan; }
if(key_s == 1 && key_w == 0 && key_a == 0 && key_d == 0) { temp.x = camera.pan + 180; }
if(key_a == 1 && key_s == 0 && key_w == 0 && key_d == 0) { temp.x = camera.pan + 90; }
if(key_d == 1 && key_s == 0 && key_a == 0 && key_w == 0) { temp.x = camera.pan - 90; }
if(key_w == 1 && key_a == 1 && key_d == 0 && key_s == 0) { temp.x = camera.pan + 45; }
if(key_w == 1 && key_d == 1 && key_a == 0 && key_s == 0) { temp.x = camera.pan - 45; }
if(key_s == 1 && key_a == 1 && key_d == 0 && key_w == 0) { temp.x = camera.pan + 135; }
if(key_s == 1 && key_d == 1 && key_a == 0 && key_w == 0) { temp.x = camera.pan - 135; }
if(temp.x != -1000) // def: (temp.x != -1000)
{
if(key_shift == 1)
{
temp.y = 10 * time_step;
}
else
{
temp.y = 15 * time_step;
}
}

my.move_x = fcos(temp.x,temp.y);
my.move_y = fsin(temp.x,temp.y);
//USE_AABB|IGNORE_PASSABLE|GLIDE
//IGNORE_PASSABLE|GLIDE
c_move(my,nullvector,my.move_x,USE_AABB|IGNORE_PASSABLE|GLIDE);

//USE_AABB|IGNORE_ME|IGNORE_PASSABLE|USE_BOX
//IGNORE_ME|IGNORE_PASSABLE|USE_POLYGON
//IGNORE_ME|IGNORE_PASSABLE
result = c_trace(vector(my.x,my.y,my.z-6),vector(my.x,my.y,my.z-4000),IGNORE_ME|IGNORE_PASSABLE|USE_AABB|USE_BOX);
if(result < 0) { my.z -= result; my.velocity_z = 0; }
if(temp.y > 0)
{
rotate_entity(temp.x,20); // def: temp.x,20
}

if(my.move_x != 0 || my.move_y != 0)
{ //if we are moving
if(my.animblend == stand)
{ //if our current animation is stand
if(key_shift == 1)
{
my.blendframe = walk;
}
else
{
my.blendframe = run;
}
}
if(my.animblend == run && key_shift == 1)
{
my.blendframe = walk;
}
if(my.animblend == walk && key_shift == 0)
{
my.blendframe = run;
}
}
else
{
if(my.animblend > stand && my.animblend != jump && my.animblend != fall)
{ /* if we aren't moving and our current animation is walk or run,
blend and cycle the stand animation */
my.blendframe = stand;
}
}
}

function handle_camera()
{
fixed temp;
var camera_distance = 200; // def: 200 distance camera is from player
camera.pan -= mouse_force.x * 12 * time_step;
camera.tilt += mouse_force.y * 8 * time_step;
camera.tilt = clamp(camera.tilt,-30,10);
temp = fcos(camera.tilt,-camera_distance);
vec_set(camera.x,vector(my.x + fcos(camera.pan,temp),my.y +
fsin(camera.pan,temp),my.z + 20 + fsin(camera.tilt,-camera_distance)));
}




smile