//////////////////////Movement/////////////////////////-sv -cl -tcp

var player_speed;


action player_movement
{
player = my;
while(1)
{
vec_set(camera.pos,my.pos);


camera.tilt = max(10,min(camera.tilt + 20 * mouse_force.y * time,-10));
camera.pan -= 20 * mouse_force.x * time;

my.pan = camera.pan;
player_speed.x = 10 * (key_w - key_s) * time;
player_speed.y = 5 * (key_a - key_d) * time;
vec_set (temp,my.x);
temp.z -= 1000;
trace_mode = ignore_me;
player_speed.z = -trace (my.x,temp);
move_mode = ignore_you + ignore_passable;
ent_move (player_speed,nullvector);




wait(1);

if(key_w ==1 || key_s ==1)
{
ent_cycle ("walk",my.skill46);
my.skill46 += 10 * time;
my.skill46 %= 100;
}

if(key_a==1) //habe noch keinen anderen Frame!^^
{
ent_cycle ("walk",my.skill46);
my.skill46 += 10 * time;
my.skill46 %= 100;
}

if(key_d==1) //habe noch keinen anderen Frame!^^
{
ent_cycle ("walk",my.skill46);
my.skill46 += 10 * time;
my.skill46 %= 100;
}

if(key_w==1 && key_shiftl==1)
{
player_speed.x = 30 * (key_w) * time;
ent_cycle ("run",my.skill46);
my.skill46 += 10 * time;
my.skill46 %= 100;
}

}
wait(1);
}


If there's a god He's watching can he give a ray of hope so much pain and so much sorrow www.lpp1991.de.vu