Aller au contenu

Photo

play custom animation does nothing


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

#1
psiiijay

psiiijay
  • Members
  • 258 messages
I'm creating a new feat for a new module I'm working on and I wanted an attack animation attached to it.
So: 
 
void ReallyPlayCustomAnimation(object oNpc, string sAnimationName, int nLooping, float fSpeed = 1.0f)
{
    PlayCustomAnimation(oNpc, sAnimationName, nLooping, fSpeed);    
}
 
void main()
{
     object oCaster = GetLastSpellCaster();
ReallyPlayCustomAnimation(oCaster, "1attack03",0,1.0);
 
}
 
Maybe the animation I listed is wrong? I don't know.. I'm trying to get combat attack03 animation to fire - compiles fine but does nothing..
Can anyone tell me what is wrong?


#2
Tchos

Tchos
  • Members
  • 5 054 messages

When I used it successfully to play an attack animation, mine looked like:

ReallyPlayCustomAnimation(oPC, "*1ATTACK01", 0);

Notice there's an asterisk (*) in front of the animation name.  This is necessary for certain animations like the attack ones.  The normal animations like "gethigh" don't require an asterisk.  The reason for the asterisk is that there are different attack animations for the different weapons the character might have.



#3
4760

4760
  • Members
  • 1 207 messages

It's also worth keeping in mind that some combat stances (namely: bow, crossbow, thrown) don't have attack03 nor attack04 animations. If your spellcaster is wielding a crossbow when he casts his spell, calling attack03 will obviously do nothing.

 

And if your NPC is not using a P_HH? (or DD? or OO? etc...) skeleton, it's highly likely that attack03 and attack04 animations don't exist (in case you were thinking about an ogre-mage or an orc shaman).



#4
psiiijay

psiiijay
  • Members
  • 258 messages

Tchos - Yeah I forgot the * and after that it worked fine.. :)

 

4760 - Right, I noticed that and started thinking of ways around it..

In the end I actually thought about leaving a certain casting animation that looks like a strike after some modifications (sounds weird I know) and use the skill with that.

 

I'll post a video of the results with the 2 animations to get an opinion which one looks better :)