Visit the Ironworks Gaming Website Email the Webmaster Graphics Library Rules and Regulations Help Support Ironworks Forum with a Donation to Keep us Online - We rely totally on Donations from members Donation goal Meter

Ironworks Gaming Radio

Ironworks Gaming Forum

Go Back   Ironworks Gaming Forum > Ironworks Gaming Forums > Neverwinter Nights 1 & 2 Also SoU & HotU Forum
FAQ Calendar Arcade Today's Posts Search

Reply
 
Thread Tools Search this Thread
Old 01-07-2004, 09:54 PM   #1
Larry_OHF
Ironworks Moderator
 

Join Date: March 1, 2001
Location: Midlands, South Carolina
Age: 48
Posts: 14,759
Can somebody teach me how to get NPCs and also PCs to sit in chairs that are in a tavern?

[ 01-07-2004, 09:55 PM: Message edited by: Larry_OHF ]
Larry_OHF is offline   Reply With Quote
Old 01-07-2004, 10:09 PM   #2
SpiritWarrior
Jack Burton
 

Join Date: May 31, 2002
Location: Ireland
Posts: 5,854
Throw this in the Onused field of your chair. This is for PC's. Make sure you make the object usable!

Quote:
void main()
{
object oChair = OBJECT_SELF;
if(!GetIsObjectValid(GetSittingCreature(oChair)))
{
AssignCommand(GetLastUsedBy(), ActionSit(oChair));
}
}
For NPC's It's a lil bit more complicated, the creature would have to be scripted so that when the game begins it finds a chair and performs the ActionSit command.

Create a chair and give it the tag "CHAIRNPC" or whatever you want (keep it simple). Place the NPC next to the chair. Copy and save their OnSpawn script under another name, and add this line at the bottom:

ActionSit (GetNearestObjectByTag ("CHAIRNPC", OBJECT_SELF));

If your gonna call it something else make sure the tag "CHAIRNPC" of the actual chair matches that in the script like I have done above.
Note that when a PC speaks to the NPC, they will stand up. To get them to sit back down, you will need to go to the 'Other Files' tab in their dialogue. You will see spots for two scripts there, which activate when dialogue is either ended or aborted. Make a script that calls the above line and they will sit back down once dialogue is over.

[ 01-07-2004, 10:14 PM: Message edited by: SpiritWarrior ]
__________________
Still I feel like a child when I look at the moon, maybe I grew up a little too soon...
SpiritWarrior is offline   Reply With Quote
Old 01-07-2004, 10:13 PM   #3
Darkman
Avatar
 

Join Date: July 11, 2001
Location: Austin, Texas
Age: 42
Posts: 525
You can put this script in the On Used spot of a bench/chair to have your players sit in it. Make sure the bench/chair is marked as Useable.

void main()
{
object oPlayer=GetLastUsedBy();

if(GetIsPC(oPlayer))
{
object oChair = OBJECT_SELF;
if (GetIsObjectValid(oChair) && !GetIsObjectValid(GetSittingCreature(oChair)))
{
AssignCommand(oPlayer, ActionSit(oChair));
}
}
}

This code was taken from the Halls of Advanced Training module.
-----------------------------

As for NPC's, here are scripts I used in one of my modules that makes the NPC sit down upon being spawned and remain seated when talked to.

Put this one in the On Spawned spot of the NPC:

void main()
{
//Sits the NPC down
int nChair = 1;
object oChair;
//"DROW_THRONE" is the tag name of the chair to be used
oChair = GetNearestObjectByTag("DROW_THRONE", OBJECT_SELF, nChair);
ActionSit(oChair);
}


And this one in the On Conversation:

void main()
{
//Set the NPC as the speaker
if(GetCommandable(OBJECT_SELF))
{
//Start the conversation script
BeginConversation();
ClearAllActions();
// Clear the actions so the NPC will not follow you with his/her eyes
int nChair = 1;
object oChair;
oChair = GetNearestObjectByTag("DROW_THRONE", OBJECT_SELF, nChair);
//Sit the NPC down
ActionSit(oChair);
}
}


Let me know if you have any questions.
__________________
There more of it there is,<br />The less you see.
Darkman is offline   Reply With Quote
Old 01-08-2004, 02:54 AM   #4
Larry_OHF
Ironworks Moderator
 

Join Date: March 1, 2001
Location: Midlands, South Carolina
Age: 48
Posts: 14,759
wow!

Thanks guys!
Larry_OHF is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Everything I learned, I learned from Rocky Sir Degrader General Conversation Archives (11/2000 - 01/2005) 1 01-11-2005 09:04 PM
Sitting on the other end.... Ziroc NWN Mod: Escape from Undermountain 2 03-04-2004 06:20 PM
Sitting down Alisttair Neverwinter Nights 1 & 2 Also SoU & HotU Forum 4 09-29-2002 06:29 PM
Sitting on the dock of the bay... DraconisRex Miscellaneous Games (RPG or not) 4 05-30-2002 02:53 PM
So here am I, sitting in the dark... Epona General Conversation Archives (11/2000 - 01/2005) 18 04-09-2001 08:33 PM


All times are GMT -4. The time now is 09:13 PM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
©2024 Ironworks Gaming & ©2024 The Great Escape Studios TM - All Rights Reserved