Aller au contenu

Photo

how to use custom animations to perorm NPC animation? sample script please.


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

#1
Spectre-

Spectre-
  • Members
  • 7 messages
Hi

I am trying to learn how to script a custom animation.

use PlayCustomAnimation

( list of animations )

I am not sure how to script this properly.

// FAK - OEI 5/16/05
// Returns TRUE if it found an object to play a custom animation one
// oObject is the object to play the animation on
// sAnimationName is the name of the gr2 to play
// nLooping is 0 for one-off, 1 for loop
// fSpeed is the playback speed: 1.0 is default, < 0 is backwards
int PlayCustomAnimation( object oObject, string sAnimationName, int nLooping, float

Can someone provide a sample script using this to make an NPC perform an animation?  It will help me to learn.

#2
kamal_

kamal_
  • Members
  • 5 258 messages
There's a ton of examples in my commoner ai. Look in the script sh_npc_activeinc, which defines the activities.
nwvault.ign.com/View.php

#3
Spectre-

Spectre-
  • Members
  • 7 messages
Thanks very much. Sorry for the Noob questions, I am new to this, but I plan to keep at it as a solid hobby. I once learned c++ programming but it was years and years ago and it appears I forgot the majority of what I learnt, other than simple if then commands. I hope this will bring some of it back to me.

The editing tools in the NWN series are an awsome additon. As long as people are scripting there will always be further adventures to play.


I appreciate the help.   Your AI contribution is amazing.  I cannot wait to try this out.

Modifié par Spectre-, 15 août 2012 - 04:41 .