Recent changes Random page
GAMING
Gaming
 
WoWWiki
Halopedia
FFXIclopedia
Age of Conan
Warhammer Online
Grand Theft Wiki
See more...

NPC Stay's Seated During Conversation

From NWNWiki

Jump to: navigation, search

[edit] NPCs stay seated while talking

This can be handled several ways. But the simplest is to use a version of the above function in the Root text (first line) of the NPC.

Place this script in the "Actions Taken" script handle on the first line of the NPCs conversation. Note: you must remove the nw_walk_wp script from the "End Conversation Normally" script handle found in the "Current File" Tab or the NPC will stand up at the end of the conversation.

/////////////////////////////////////////////////////////
//Place in "Actions Taken" of the NPCs first convo node
//Make sure tag is correct and remove the nw_walk_wp
//script from the End Conversation Normally handle.
/////////////////////////////////////////////////////////
void main()
{
   object oChair = GetNearestObjectByTag("Chair");
   //Make sure no one is in chair, if not sit-down.
   if(!GetIsObjectValid(GetSittingCreature(oChair)))
     {
     ClearAllActions(); //This is so he don't spin in his chair, following you.
     ActionSit(oChair);
     }
}
//End
Rate this article:
Share this article: