View Single Post
Old 03-18-2003, 10:55 PM   #2
SpiritWarrior
Jack Burton
 

Join Date: May 31, 2002
Location: Ireland
Posts: 5,854
Nah as far as I know it ain't possible to have them simply sitting on the floor (terrain) but on placeables yes, they can sit in chairs just like PC's do. The script needs to be fired from the NPC's onspawn though...

The creature would have to be scripted so that when the game begins it finds a chair and performs the ActionSit command.

Create a placeable object 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.

[ 03-20-2003, 12:11 AM: 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