Hallo,
leider geht das bei mir nicht, wahrscheinlich ist da nur eine kleine Änderung nötig. Hier der Code: (do you know a way, how Cbabe.mdl can go upstairs with this Code)
action players_action
{
player = my;
my.polygon = on;
var players_distance;
var anim_percentage;
while (1)
{
vec_set (camera.x, vector (30, 0, 50));
vec_rotate (camera.x, player.pan);
vec_add (camera.x, player.x);
camera.pan = player.pan;
camera.tilt +=2 * mouse_force.y * time;
my.pan += 5 * (key_a - key_d) * time_step - 10 * mouse_force.x * time_step;
players_distance.x = 5 * (key_w - key_s) * time_step;
players_distance.y = 0;
players_distance.z = 0;
c_move (my, players_distance, nullvector, glide);
if ((key_w == 1) || (key_s == 1)) // the player is walking?
{
ent_animate(my, "walk", anim_percentage, anm_cycle);
anim_percentage += 8 * time_step;
}
else // the player is standing still?
{
ent_animate(my, "stand", anim_percentage, anm_cycle);
anim_percentage += 0.5 * time_step;
}
wait (1);
}