Author Topic: Looping animation question.  (Read 341 times)

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
Looping animation question.
« on: May 24, 2012, 12:42:04 am »


               So I'm trying to use "ANIMATION_LOOPING_LISTEN". As the constant suggests this should be a looping animation but when I use it, it just seems to work more like a fire and forget animation, just one quick listening animation and it's done.

else if (sSaid == "/listen")
AssignCommand(oSpeaker,ActionPlayAnimation(ANIMATION_LOOPING_LISTEN, 1.0, 10000.0));

All the other looping animations seem to work fine. Is this a know bug or issue with this particular animation? Was it intended to be used as a fire and forget and not a looping?
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Looping animation question.
« Reply #1 on: May 24, 2012, 01:08:14 am »


               That is a head only animation, Is it not? 

It may be a problem with the client always repointing the head in different angle.   Like when the player mouses over a placeable and the PC head points that direction.  I think, I would have to get creative with it. Something like:

 void ActionListenLoop()
{
    ActionPlayAnimation(ANIMATION_LOOPING_LISTEN, 1.0, d6()/4.0);
    //ActionWait(d6()/4.0);// Only needed it the action above is not delaying.
    ActionDoCommand(ActionListenLoop());
}...
 

...else if (sSaid == "/listen")
   AssignCommand(oSpeaker,ActionListenLoop());
               
               

               
            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
Looping animation question.
« Reply #2 on: May 24, 2012, 01:11:05 am »


               

Lightfoot8 wrote...

That is a head only animation, Is it not? 


Hmm. I'm not sure. The body does also lean foward for a second when this animation occurs. I'll try out your suggestion and see if it works. Thanks L8.
               
               

               
            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
Looping animation question.
« Reply #3 on: May 24, 2012, 01:26:56 am »


               

Lightfoot8 wrote...

I think, I would have to get creative with it. Something like:

 void ActionListenLoop()
{
    ActionPlayAnimation(ANIMATION_LOOPING_LISTEN, 1.0, d6()/4.0);
    //ActionWait(d6()/4.0);// Only needed it the action above is not delaying.
    ActionDoCommand(ActionListenLoop());
}...
 

...else if (sSaid == "/listen")
   AssignCommand(oSpeaker,ActionListenLoop());


Works great! Thanks L8.

I still don't know why it doesn't loop as intended though. I even made sure there was nothing around to look at and didn't move my mouse. Same thing. They lean foward, shake head and lean back again. That's it.