I fixed this by myself. But now I have another problem.
On the entity that moves now correctly with the bone animation I have attached another entity wich doesn't work with bones.
But that model rotates around (with the pan-method), but it need also tilt with the arm (the model wich have the bone animation).
These two movements doesn't work anymore.
Before I used the bone-method on the main model (the arm) it worked correctly. But now doesn't.
Here is the code of the arm (The model wich have the bone-animation)
Code:
action arm1
{
arm_1 = my;
my.passable = on;
vec_for_vertex(temp,my,87);
ent_create("kruis.mdl",temp, kruis1);
while(my)
{
vec_for_vertex(temp, machine, 235);
my.x = temp.x;
my.y = temp.y;
my.z = temp.z;
my.pan = machine.pan +90;
my.scale_x = 1.7;
my.scale_y = 1.7;
my.scale_z = 1.7;
if(key_e == on)
{
my.skill15 += 1.5*time_step;
}
ent_animate(my,NULL,0,0);
ent_animate(my,"move",my.skill15,ANM_CYCLE);
wait(1);
}
}
And here is the code of the model wich I want to rotate under the right angle.
Code:
action kruis1
{
kruis_1 = my;
my.passable = on;
while(1)
{
vec_for_vertex(temp, arm_1, 87);
my.x = temp.x;
my.y = temp.y;
my.z = temp.z-4;
my.scale_x = 0.7;
my.scale_y = 0.7;
my.scale_z = 0.7;
my.roll =- kruis_1.roll;
my.tilt = arm_1.skill15;
my.pan -= arm_1.pan;
my.pan += cross;
if(key_w == 1.2)
{
if(cross < 1)
{
cross += 0.015*time_step;
}
}
if(key_s == 1)
{
if(cross > 0)
{
cross -= 0.015*time_step;
}
}
c_rotate(my, vector(arm_1.pan,arm_1.skill15,0), USE_AXIS);
wait(1);
}
}
I hope you know what I doing wrong.