Posted By: Schmerzmittel
Kollisoinserkennung reagiert nicht. - 08/06/07 02:28
Tagchen.
Entweder ich hab nen Bug entdeckt oder nur mein System is im Eimer.
Ich verwende die Player-Action aus der aum von Morrowing um meine Levels zu testen.
Ich habe eine HMP und ein Holzhaus...zudem befinden sich drei MDL als Dynamisches licht mit dem Flag Passable.
Egal was ich anstelle, ich kann nicht durch die mdl mit Passable laufen. Habe jetzt auch ein paar andere Bewegungsscripts probiert und es geht nicht. Das einzige was geht sind levelblocks und das HMP. Aber sobald ein Model da ist, geht nicht.
Teilweise kann ich durch das Haus mdl durchlaufen bleibe aber dann immer in der Mitte hängen. Zudem kann ich auch nur an zwei wänden des Hauses reinlaufen.
Kann das sein, dass das ein Bug ist? Habe nämlich nicht lust, jedes MDL mit Blöcken zu versehen.
Danke schon mal
Schmerzmittel
P.s. Ausserdem habe ich immer die Windowsmauszeiger im spiel, egal ob Mousemode aus ist oder nicht.
Hier mal das Bewegungsscript. Müsste stimmen, hab ich so von der Aum übernommen.
action player1
{
player = my; // I'm the player
my.material = ShaderExampeModel_mat;
my.pan = 160;
my.transparent = on; // the player is transparent
my.alpha = 100; // but opaque if the camera doesn't run into obstacles
my.skill40 = camera_distance; // we store the distance to the camera
my.skill41 = camera_height; // and its height
camera_mode = 1; // the game starts with the camera in 3rd person mode
while (1)
{
player.pan -= 10 * mouse_force.x * time - 1.5 * (key_a - key_d); // player's pan is controlled by the mouse and the "A" and "D" keys
camera.x = player.x - camera_distance * cos(player.pan); // keep the camera behind the player
camera.y = player.y - camera_distance * sin(player.pan); // at the distance given by camera_distance
camera.z = player.z + camera_height + 0.8 * sin(my.skill46 * 3.6); // and above the player
camera.pan = player.pan; // the camera has the same pan angle with the player
camera.tilt += 7 * mouse_force.y * time; // and can tilt freely
camera_distance = min (max (camera_distance, 5), 500); // camera_distance can have values between 5 and 500
if (key_w + key_s > 0) // if the player is walking
{
ent_cycle("walk", my.skill46); // play its "walk" frames animation
my.skill46 += 10 * (1 + key_shift * 0.5) * time; // the animation speed increases when the player presses the "shift" key
my.skill46 %= 100; // loop the animation
}
else // if the player is standing
{
my.skill47 = 0; // reset the skill that stores the distance needed for the step sound (not really needed)
ent_cycle("stand", my.skill48); // play the "stand" frames animation
my.skill48 += 2 * time; // "stand" animation speed
my.skill48 %= 100; // loop animation
}
if (camera_mode == 3) // if we are in 3rd person mode
{
avoid_obstacles(); // run the function that avoids camera collisions with the relief
}
vec_set (temp, my.x); // trace 10,000 quants below the player
temp.z -= 10000;
trace_mode = ignore_me + ignore_passable + use_box;
temp.z = -trace (my.x, temp); // and adjust its height accordingly, placing its feet on the ground
// allow the player to move using the "W" and "S" keys; the speed increases to 200% if the player presses the "shift" key
temp.x = 10 * (key_w - key_s) * (1 + 1 * key_shift) * time;
temp.y = 0;
my.skill47 += ent_move (temp, nullvector);
if (my.skill47 > 50) // play with 50 (here we've got a step sound every 50 quants)
{
snd_play(step_wav, 30, 0);
my.skill47 = 0;
}
wait (1);
}
}
Entweder ich hab nen Bug entdeckt oder nur mein System is im Eimer.
Ich verwende die Player-Action aus der aum von Morrowing um meine Levels zu testen.
Ich habe eine HMP und ein Holzhaus...zudem befinden sich drei MDL als Dynamisches licht mit dem Flag Passable.
Egal was ich anstelle, ich kann nicht durch die mdl mit Passable laufen. Habe jetzt auch ein paar andere Bewegungsscripts probiert und es geht nicht. Das einzige was geht sind levelblocks und das HMP. Aber sobald ein Model da ist, geht nicht.
Teilweise kann ich durch das Haus mdl durchlaufen bleibe aber dann immer in der Mitte hängen. Zudem kann ich auch nur an zwei wänden des Hauses reinlaufen.
Kann das sein, dass das ein Bug ist? Habe nämlich nicht lust, jedes MDL mit Blöcken zu versehen.
Danke schon mal
Schmerzmittel
P.s. Ausserdem habe ich immer die Windowsmauszeiger im spiel, egal ob Mousemode aus ist oder nicht.
Hier mal das Bewegungsscript. Müsste stimmen, hab ich so von der Aum übernommen.
action player1
{
player = my; // I'm the player
my.material = ShaderExampeModel_mat;
my.pan = 160;
my.transparent = on; // the player is transparent
my.alpha = 100; // but opaque if the camera doesn't run into obstacles
my.skill40 = camera_distance; // we store the distance to the camera
my.skill41 = camera_height; // and its height
camera_mode = 1; // the game starts with the camera in 3rd person mode
while (1)
{
player.pan -= 10 * mouse_force.x * time - 1.5 * (key_a - key_d); // player's pan is controlled by the mouse and the "A" and "D" keys
camera.x = player.x - camera_distance * cos(player.pan); // keep the camera behind the player
camera.y = player.y - camera_distance * sin(player.pan); // at the distance given by camera_distance
camera.z = player.z + camera_height + 0.8 * sin(my.skill46 * 3.6); // and above the player
camera.pan = player.pan; // the camera has the same pan angle with the player
camera.tilt += 7 * mouse_force.y * time; // and can tilt freely
camera_distance = min (max (camera_distance, 5), 500); // camera_distance can have values between 5 and 500
if (key_w + key_s > 0) // if the player is walking
{
ent_cycle("walk", my.skill46); // play its "walk" frames animation
my.skill46 += 10 * (1 + key_shift * 0.5) * time; // the animation speed increases when the player presses the "shift" key
my.skill46 %= 100; // loop the animation
}
else // if the player is standing
{
my.skill47 = 0; // reset the skill that stores the distance needed for the step sound (not really needed)
ent_cycle("stand", my.skill48); // play the "stand" frames animation
my.skill48 += 2 * time; // "stand" animation speed
my.skill48 %= 100; // loop animation
}
if (camera_mode == 3) // if we are in 3rd person mode
{
avoid_obstacles(); // run the function that avoids camera collisions with the relief
}
vec_set (temp, my.x); // trace 10,000 quants below the player
temp.z -= 10000;
trace_mode = ignore_me + ignore_passable + use_box;
temp.z = -trace (my.x, temp); // and adjust its height accordingly, placing its feet on the ground
// allow the player to move using the "W" and "S" keys; the speed increases to 200% if the player presses the "shift" key
temp.x = 10 * (key_w - key_s) * (1 + 1 * key_shift) * time;
temp.y = 0;
my.skill47 += ent_move (temp, nullvector);
if (my.skill47 > 50) // play with 50 (here we've got a step sound every 50 quants)
{
snd_play(step_wav, 30, 0);
my.skill47 = 0;
}
wait (1);
}
}


