So I have a chareckter that walks around without any paths, but;
1.He walks over Passable.
2.He has no gravity.
code;
_______________________________________________________________
action walker_man()
{
VECTOR temp[3];
VECTOR front_pos;
var distance_covered;
var distance_to_ground;
my.emask |= (ENABLE_IMPACT | ENABLE_ENTITY | ENABLE_BLOCK);
c_setminmax(me);
my.event = die_soldier;
while (1)
{
vec_set (temp.x, my.x);
temp.z -= 10000;
distance_to_ground = c_trace (my.x, temp.x, IGNORE_ME | USE_BOX | IGNORE_PASSABLE);
vec_set(front_pos.x, vector(500, 0, 0));
vec_rotate(front_pos.x, my.pan);
vec_add(front_pos.x, my.x);
if (c_content(front_pos.x, 100) == 1)
{
distance_to_ground = c_trace (my.x, temp.x, IGNORE_ME | USE_BOX | IGNORE_PASSABLE) -20;
distance_covered = c_move(my, vector(10 * time_step, 0, 0), nullvector, IGNORE_PASSABLE | GLIDE);
my.skill22 += 7 * time_step;
ent_animate(my, "ComNwForward", my.skill22, ANM_CYCLE);
}
else
{
my.skill99 = 0;
while (my.skill99 < 0.5)
{
my.skill99 += time_step / 16;
ent_animate(my, "ComNormalStand", my.skill22, ANM_CYCLE);
my.skill22 += 7 * time_step;
wait (1);
}
my.skill99 = my.pan;
my.skill99 += random(180);
while (my.pan < my.skill99)
{
my.pan += 5 * time_step;
ent_animate(my, "ComNwRight", my.skill22, ANM_CYCLE);
my.skill22 += 7 * time_step;
wait (1);
}
}
wait (1);
}
}
_______________________________________________________________
Hop somebody can help.
(Im sure somebody can help)