Author Topic: How Do I Make NPC Werewolf Animations? Can Anyone Help Please?  (Read 471 times)

Legacy_MissJaded

  • Full Member
  • ***
  • Posts: 243
  • Karma: +0/-0
How Do I Make NPC Werewolf Animations? Can Anyone Help Please?
« on: October 15, 2011, 08:25:53 pm »


               Excuse me? Can anyone out there help me please?

I'm trying to get my werewolf in a cutscene to do a couple of animations. But it isn't working for me.'<img'>

I've been using the new and updated version of Lilac Soul's script generator, LS-TK Script generator (Absolutely great program btw. Never have been able to get anywhere making scripts for nwn 1 without it!) to create the effect of an npc werewolf doing a couple of victory animations, and I'm hoping that someone will be able to help me sort this out please?

This is the script I started with.



void main()
{


object oActor;



    // Only fire for (real) PCs.
    if ( !GetIsPC(oPC)  ||  GetIsDMPossessed(oPC) )
        return;

    // Have "WhiteWerewolf" perform a sequence of actions.
    oActor = GetObjectByTag("WhiteWerewolf");
    AssignCommand(oActor, ActionWait(22.0));
    AssignCommand(oActor, ActionPlayAnimation(ANIMATION_FIREFORGET_VICTORY1));
    AssignCommand(oActor, ActionWait(25.0));
    AssignCommand(oActor, ActionPlayAnimation(ANIMATION_FIREFORGET_VICTORY2));
    AssignCommand(oActor, ActionWait(28.0));
    AssignCommand(oActor, ActionPlayAnimation(ANIMATION_FIREFORGET_VICTORY3));


}



Once that didn't work, I then I tried to change it.
Where I have oActor, I first attempted to change them all to oCaster.
No go!'<img'>

I then attemped to change them all to oWerewolf
But that wasn't working for me either.'<img'>


What I have shown above, is only a part of a very long script.
But this is the part I'm trying to work on right now.

Does anyone out there know how I can possibly get my npc werewolf to do these scripted animations please?

Can anyone out there help me?
               
               

               


                     Modifié par MissJaded, 15 octobre 2011 - 07:35 .
                     
                  


            

Legacy_Xardex

  • Sr. Member
  • ****
  • Posts: 414
  • Karma: +0/-0
How Do I Make NPC Werewolf Animations? Can Anyone Help Please?
« Reply #1 on: October 15, 2011, 09:30:30 pm »


               Well, ActionWait(22) makes the target wait 22 seconds before doing the next queued action. Basically this script makes him wait 22s, do an animation, wait 25s, animation, 28s, animation... Which seems kinda odd. If that is intentional, maybe you have ClearAllActions called somewhere later in your script? Anyhow, name of the variable (object oActor) doesn't matter.
               
               

               


                     Modifié par Xardex, 15 octobre 2011 - 08:32 .
                     
                  


            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
How Do I Make NPC Werewolf Animations? Can Anyone Help Please?
« Reply #2 on: October 15, 2011, 10:27:07 pm »


               Well First I do not see the part where you have defined oPC, So I have no idea if your filter to check oPC may be causing a problem or not.  Also I have No idea what event you are running this from.   

However the script itself may not be the problem,  You may simply be using a model that just does not have the animanations that you are trying to use.   To test this out change the model of your oActor to one of the PC model, Human, Dwarf, halfling...   any one of them will be good for the test.    After changing there appearance type test your mod again.   If your new appearance does your victory dance where the werewolf did not, then the warewolf model/appearance is simply unable to do them.    At that point it becomes more of a Custom Content question then a scripting one.
               
               

               
            

Legacy_MissJaded

  • Full Member
  • ***
  • Posts: 243
  • Karma: +0/-0
How Do I Make NPC Werewolf Animations? Can Anyone Help Please?
« Reply #3 on: October 16, 2011, 05:31:13 am »


               Thank you for the helpful replies guys.[smilie]../../../images/forum/emoticons/smile.png[/smilie]

I have recreated my werewolf animation script using the new LS-TK Script Generator so that you guys can see the script in full to understand the full use and the bits I missed out previously.

// Put this script OnEnter.

void main()

{

    object oActor;



    // Get the creature who triggered this event.

    object oPC = GetEnteringObject();



    // Only fire for (real) PCs.

    if ( !GetIsPC(oPC)  ||  GetIsDMPossessed(oPC) )

        return;



    // Have "WhiteWerewolf" perform a sequence of actions.

    oActor = GetObjectByTag("WhiteWerewolf");

    AssignCommand(oActor, ActionWait(22.0));

    AssignCommand(oActor, ActionPlayAnimation(ANIMATION_FIREFORGET_VICTORY1));

    AssignCommand(oActor, ActionWait(2.0));

    AssignCommand(oActor, ActionPlayAnimation(ANIMATION_FIREFORGET_VICTORY2));

    AssignCommand(oActor, ActionWait(2.0));

    AssignCommand(oActor, ActionPlayAnimation(ANIMATION_FIREFORGET_VICTORY3));

}



The one i showed earlier, I had to take out the line :
object oPC = GetEnteringObject();
It was already used in an earlier part of my script, and it wouldn't compile unless I took it out.

Secondly, reading your replies, I tried the same animation script, but testing out using 1 of the npc elf models as"Lightfoot8" suggested, instead of using the werewolf npc model.

I have found that (as "Lightfoot8" mentioned) this is an issue with the actual werewolf model.
The script compiles successfully, no errors e.t.c.
But definitely the npc models.

The npc elf did the animations very successfully, unlike the werewolf who just stood there doing nothing.
:-/ *sigh!*

Also, I changed the amount of time inbetween the animations when I realized my mistake.
So for the 1st one, the npc would wait 22 secs, then do 1st animation, then wait 2 secs and do 2nd animation and another 2 secs to do the 3rd animation. I got a bit confused at first, but that part is right now.

I guess there are certain animations in the game which only certain npc's can do.
I have a couple of wolf npcs in 1 area doing the howl animation before a howling sound is heard in the background/foreground. So I realize that you probabaly couldn't add the same howling animation to other npcs, (like a dwarf or human for e.g.) as it wouldn't work. :-/ *sigh!*

Personally I think that would be a great shame, as you could create a scene (for e.g.) with a human npc howling into the distance before turning into a werewolf. That would make for part of an interesting story I think.

But anyway, I guess this now becomes a custom content issue as Lighfoot8 mentioned.

Looks like I'll have to rethink what my werewolf should do now, and having learnt what I have now, I think I'm going to take this to the custom content section and see if there's anything that anyone could do about it.

Thanks again.'B)'
               
               

               
            

Legacy_lordofworms

  • Sr. Member
  • ****
  • Posts: 422
  • Karma: +0/-0
How Do I Make NPC Werewolf Animations? Can Anyone Help Please?
« Reply #4 on: October 16, 2011, 02:13:39 pm »


               you can do a werewolf 'Taunt' animation though (he is able to do that one), and that has him barking at the moon kinda...just FYI
               
               

               
            

Legacy_MissJaded

  • Full Member
  • ***
  • Posts: 243
  • Karma: +0/-0
How Do I Make NPC Werewolf Animations? Can Anyone Help Please?
« Reply #5 on: October 16, 2011, 09:22:35 pm »


               

lordofworms wrote...

you can do a werewolf 'Taunt' animation though (he is able to do that one), and that has him barking at the moon kinda...just FYI


Hi.

Thanks for the helpful reply. That's a good idea. I'll try that out I think.'B)'
               
               

               
            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
How Do I Make NPC Werewolf Animations? Can Anyone Help Please?
« Reply #6 on: October 17, 2011, 05:14:37 pm »


               <scratching his drinking buddy...>

lordofworms wrote...
you can do a werewolf 'Taunt' animation though (he is able to do that one), and that has him barking at the moon kinda...just FYI

Cool :-) I was wondering what to do for the SummonPack anim on my Wolfen, when I get around to making them a viable race... Think I'll grab me a certain Taunt ;-)

Thanks, LoW :-)

<...behind her ear. *Ear*! sheesh.>
               
               

               
            

Legacy_MissJaded

  • Full Member
  • ***
  • Posts: 243
  • Karma: +0/-0
How Do I Make NPC Werewolf Animations? Can Anyone Help Please?
« Reply #7 on: October 18, 2011, 12:57:47 am »


               I have a question here, if anyone could answer it for me please?

In the toolset's script editor window, on the right hand side in the Constants List,
Click Here
there is a list of about 20 custom animations (for e.g. "ANIMATION_LOOPING_CUSTOM16")

I guess I'm wondering if there might be a very small chance if any of them could be used to produce animation results that I was looking for here originally. (i.e. werewolf victory animation) in any way.
I don't want to be too hopeful here. But I'm only wondering if it's a possibility or not?

But in any case, if anyone knows, please can someone tell me what those cutom looping animations can be used for please, and on what types of NPCs?
               
               

               


                     Modifié par MissJaded, 18 octobre 2011 - 12:02 .
                     
                  


            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
How Do I Make NPC Werewolf Animations? Can Anyone Help Please?
« Reply #8 on: October 18, 2011, 01:10:24 am »


               Well, This is way out of my field, It is also the reason I stated it is more of a Custom Content question now.   I did a quick search of the Omnibus and came up with this.  

typheus orikoma1 wrote...
I want to know before I even start looking just so I dont waste my time. Is it possible ot give custom animations to NPCs or monsters? Like lets say the dragons only have the threaten and fall down foward emotions. Would it be possible to create animations for the others?



ragnarok_mr4 wrote...
Short answer:
Yes, it is possible
Long answer:
You can create all the animations you want, but you MUST make sure that you use the naming convention for those animations so that they will be used by the game. Otherwise you would have wasted your time as the game won't play your new anims anyway.
Moreover, you will also need to change the creature's entry in appearance.2da so that it uses the FULL ANIMATION SET instead of the SMALL ANIMATION SET. Making that change entails that you rename ALL existing animations for that creature and add all the new ones required for a the new set (that's like from 40+ animations to over 130 animations).
Another option is to use the slots reserved for the 10 animation_looping_custom hooks. However if you use those for your new animations, you will have to call them via script to get them to play. The engine will not use them otherwise.
Hope this helps [/icon_smile.gif]
_________________
Lead Artist, roXidy Games
------------------------------
www.dladventures.com


               
               

               
            

Legacy_MissJaded

  • Full Member
  • ***
  • Posts: 243
  • Karma: +0/-0
How Do I Make NPC Werewolf Animations? Can Anyone Help Please?
« Reply #9 on: October 19, 2011, 12:27:06 am »


               

Lightfoot8 wrote...

Well, This is way out of my field, It is also the reason I stated it is more of a Custom Content question now.   I did a quick search of the Omnibus and came up with this.  

typheus orikoma1 wrote...
I want to know before I even start looking just so I dont waste my time. Is it possible ot give custom animations to NPCs or monsters? Like lets say the dragons only have the threaten and fall down foward emotions. Would it be possible to create animations for the others?



ragnarok_mr4 wrote...
Short answer:
Yes, it is possible
Long answer:
You can create all the animations you want, but you MUST make sure that you use the naming convention for those animations so that they will be used by the game. Otherwise you would have wasted your time as the game won't play your new anims anyway.
Moreover, you will also need to change the creature's entry in appearance.2da so that it uses the FULL ANIMATION SET instead of the SMALL ANIMATION SET. Making that change entails that you rename ALL existing animations for that creature and add all the new ones required for a the new set (that's like from 40+ animations to over 130 animations).
Another option is to use the slots reserved for the 10 animation_looping_custom hooks. However if you use those for your new animations, you will have to call them via script to get them to play. The engine will not use them otherwise.
Hope this helps [/icon_smile.gif]
_________________
Lead Artist, roXidy Games
------------------------------
www.dladventures.com


Thanks a lot for your very helpful reply here.'<img'>
Wow! I'm a bit surprised (in a pleasant way:)) you had to go searching round for the info I was looking for. I hope it didn't take up too much of your time though.

As you mentioned, this is again.... probabaly more related to custom content now.
There are 1 or 2 areas of the reply you pasted that I'm a bit confused over, and since you stated that it's out of your field, I think I shall now take this to the custom content forum.

I appreciate what you have done here.
Thanks again.'B)'
               
               

               


                     Modifié par MissJaded, 18 octobre 2011 - 11:28 .