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

PC's sit in chairs

From NWNWiki

Jump to: navigation, search


[edit] PC's Sit in chairs

To Make the chairs "usable" and place the following script in the "OnUsed" Script handle.

Note: This script can also be placed in the OnUsed of an Invisable Object. This object can then be placed on other tings. Place 2 on a bench so more than one person can sit down.

//////////////////////////////////////////////////
//Function: Use on placeables so PCs can sit.
//Ver: 1.0
//Modified by:
//Date:
///////////////////////////////////////////////////////
//Place this script in the OnUsed handler of the object
///////////////////////////////////////////////////////
void main()
{
    object oChair = OBJECT_SELF;
    //Make sure no one is in chair, if not sitdown.
    if(!GetIsObjectValid(GetSittingCreature(oChair)))
        {
        AssignCommand(GetLastUsedBy(),ActionSit(oChair));
        }
}
//End

[edit] Note

If the invisable Object is used, Most TileSet Benches, bar stools Don't have a "Front". You will need to play with the possition of the invis object to get the PC to sit in the correct direction. If the object in directly on top of (for Example) the Bar stool. PCs will always Face East when they sit on it. Simply slide the invis object off the stool until it falls to the ground. ( kinda "half-on / half-off" the stool), The PC should then sit correctly, although they will be sitting on the edge of the stool


[edit] Extra

For Invisible Objects take a look at Tom's Invisible Object Fix On the Vault

Rate this article:
Share this article: