I did eventually change it to vec_set but when messing around I used the longer way.

Just a question, has anyone had any luck syncing up the warlock staff's "attack" scene to the warlock's attack scene? I can't seem to get the z of each to line up very well. I managed to get the walk and death to work very nicely but attack seems off.

The problem is when my.STATE = 2
the staff hovers above the player, when I adjust the z using wpos.z-45 (or whatever) I can get the height right but the staff doesn't stay in his hand, it seems to slide a bit (because of the vertex locking I believe).

Has anyone played around with these two (the warlock and his staff) and gotten it to work correctly?

I noticed the staff is offset in the MED, perhaps they simply match the x, y, and z of the model and don't lock to a vertex? I want to lock the vertex because I want to show my students how to use vec_to_vertex but I can't very well show them using this method when the staff doesn't look correct w/my coding.

here's my code
Code:
function staff()
{
VECTOR wpos;
set(my,PASSABLE);
while(1)
  {
  vec_for_vertex(wpos, player, 23);
  my.pan = player.pan;
  my.STATE = player.STATE;
  my.ANIMATION = player.ANIMATION;
  if (my.STATE == 1)
    {
    ent_animate(me, "walk", my.ANIMATION, ANM_CYCLE);
    vec_set(my.x, wpos);
    }
    if (my.STATE == 2)
    {
    vec_set(my.x, vector(wpos.x, wpos.y, wpos.z-40));
    ent_animate(me, "attack", my.ANIMATION, NULL);
    }
    if (my.STATE == 3)
    {
    ent_animate(me, "walk", my.ANIMATION, NULL);
    vec_set(my.x, wpos);
    }
    if (my.STATE == 4)
    {
    ent_animate(me, "death", my.ANIMATION, NULL);
    vec_set(my.x, wpos);
    }
    wait(1);
  }
}



Thank you for your time, it has been very helpful!