Your function seems to partially work. I am still trying to adapt it to my code to possibly make it work.

In the meantime, I found another possible solution that seems to work mostly well. I am using ent_moveto() and ent_turnto() functions. They seem to be moving the monster down the staircase as needed. The only problem is that I am using a wait_for_my(ent_moveto) function that seems to prevent any animations from occurring, such as a running animation, until the ent_moveto() is finished.

Here is the code I am using to do this:

Code:
action monster_code()
{
   ...

   ent_animate(my, "run", anim_percentage, ANM_CYCLE); // This does not work 
                                       //    with the wait_for_my(ent_moveto)
                                       //    below.
   anim_percentage += 8 * time_step;

   ent_moveto(me, vector(322,555,196), 4); // 1st location down spiral staircase
   ent_turnto(me, vector(360,0,0), 4);
   wait_for_my(ent_moveto);
   ent_moveto(me, vector(617,37,120), 4); // 2nd location down spiral staircase
   ent_turnto(me, vector(300,0,0), 4);
   wait_for_my(ent_moveto);   // wait until target position reached        
   ent_moveto(me, vector(315,-442,49), 4); // 3rd location down spiral staircase
   ent_turnto(me, vector(240,0,0), 4);
   wait_for_my(ent_moveto);

   ...
}



If I take out all the wait_for_my() code, the running animation will happen, but the monster entity will move through the air directly from the 1st spiral staircase location to the 3rd location. The wait_for_my() functions make it so that the monster entity reaches the next location before turning and moving toward the next location given. The ent_turnto() seems to work with the wait_for_my() function calls, just not the running animation.

If I took out just the last wait_for_my() function call out of the above code, the monster would move and face the correct destinations while gliding with no animation. Once it got past the second destination though, it would start a running animation while it was being moved using ent_moveto(), so it is clear that the wait_for_my() function is what is causing the running animation to not occur.

Is there a way to allow the running animation to keep going even though the wait_for_my() function is being used?

This method seems to work perfectly, except for the fact that the monster does not appear to be running, only gliding toward the right directions with no animation.



Last edited by Ruben; 10/30/15 21:51.