Aller au contenu

Photo

Looping animation question.


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
GhostOfGod

GhostOfGod
  • Members
  • 863 messages
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?

#2
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages
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());

#3
GhostOfGod

GhostOfGod
  • Members
  • 863 messages

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.

#4
GhostOfGod

GhostOfGod
  • Members
  • 863 messages

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.