i am working through the KH movement tutorial at the moment and it goes well.
I added some new animations, for example an equip / unequip sword animation and a second
stand or idle animation, because there should be another stand animation if the player has unequipped
his sword an put it on his back.
Blending the animations goes well , that means the blending or playing the animation itself is not a problem.
But now i´ve got a problem.

The weapon attachment does not fit to the animation.

that means now the code does:

he holds the sword in hand, next it is still on his back while it is playing the animation.

How can I fix it?

Can anybody help me please?

Code:
ACTION attach_weapon {
my.passable = on;
my.scale_x = 2.5;
my.scale_y = 2.5;
my.scale_z = 2.5;
proc_late();
WHILE (you != null) {
IF (equip_sword == 1)
{
vec_for_vertex(temp.x,you,152); //hand palm base
vec_for_vertex(temp2.x,you,124); //hand palm tip
vec_set(my.x,temp.x);
vec_diff(temp.x,temp2.x,temp.x);
vec_to_angle(temp.pan,temp.x);
vec_set(my.pan,temp.pan);
wait(1);
}
ELSE
{
vec_for_vertex(temp.x,you,269); //      sword on   
vec_for_vertex(temp2.x,you,720); //    his back
vec_set(my.x,temp.x);
vec_diff(temp.x,temp2.x,temp.x);
vec_to_angle(temp.pan,temp.x);
vec_set(my.pan,temp.pan);
wait(1);	
}
}
}




FUNCTION handle_movement()
.
.
.

IF(key_1 == 0 && key1_press ==1) { key1_press = 0;}
IF(equip_sword ==1)
{
IF(key_1 == 1 && key1_press ==0 && my.animblend >= stand){ my.blendframe = equip; key1_press = 1; equip_sword = 0;}
}
ELSE
{
IF(key_1 == 1 && key1_press ==0 && my.animblend >= stand){ my.blendframe = equip; key1_press = 1; equip_sword = 1;}
}

.
.
.


thank you in advance,
bye