Aller au contenu

Photo

Custom Animation for NPC


  • Veuillez vous connecter pour répondre
1 réponse à ce sujet

#1
Illustair

Illustair
  • Members
  • 62 messages
Hi. I've just added the KEMO animations with Heed's PC Tool, and they work perfectly as intended. However, it can't be used on NPCs. I've checked the script itself, and it uses "object oPC = OBJECT_SELF"; and with my limited knowledge of scripting, it means the one who triggers the script is the object. With that, I wondered why the animations won't trigger for NPCs (selected party members) and only for the PC. I thought that maybe if I select the party member before hand, the object_self would be that party member...but I was wrong. FIRST QUESTION: Why is it like that, what does that mean then? I'm sure many of you are familiar with the mod I'm taking about...in my case, it's the override version: http://nwvault.ign.c...r.Detail&id=284

So I thought maybe there are other ways I could make the system know that this certain NPC is the one who triggered the script and should be the object_self, like just creating an in-game item or object that when interacted, it activates the script. But the best alternative, I guess is to incorporate the custom animations to "emote" section in the "basic actions" drop-down menu - that is, in addition to the point, victory, bow, salute animations, etc. I've seen the NWN2_Emotes.2da that the contextmenu.xml refers to, and I have the .gr2 animations, but I don't know what to do next. SECOND QUESTION: Can anybody please tell me what should I do next? Better yet, is my approach the right approach...if not, what else should I do?

Sorry for the long post. Thanks in advance, I'd appreciate any help.

#2
Illustair

Illustair
  • Members
  • 62 messages
Nevermind. I got KEMO animation with Heed's PC Tool to work for NPCs. It was pretty simple really...it's all in there, you just got to change the oTarget=OBJECT_SELF to oTarget=GetControlledCharacter(OBJECT_SELF), so it'll recognize the NPCs too and not just the PC. StoreAnimations and StoreIdle also now include the oTarget as its passed parameter to kemo_includes; of course, you'd also have to change the said functions in kemo_includes to receive them properly. It's so much simpler than the contextmenu emote approach that gave me so much headache trying to research.