I am still bit of a novice, but this should do the trick
vec_for_bone(VECTOR*,ENTITY*,STRING* name)
for positioning e.g. weapons in the players hand.
If your Zelda model has bones, you can use the code below:
action sword()
{
VECTOR bone_attach;
var percent;
var sword_life_timer = 10;
while(1)
{
vec_for_bone(bone_attach,player, "BoneRightArm"); // in MDL editor, rename the bone of the model's right arm to "BoneRightArm"
my.pan = player.pan;
percent += 0;
ent_animate(player,"atk",percent,NULL);
sword_life_timer -= 1 * time_step;
if (sword_life_timer <= 0)
{
ent_remove(me);
return;
}
wait(1);
}
}
If you dont know about bones, you should learn about them, it is very handy (see Lite-C Workshop 23: Bones).