Page 1 of 1

Sitdown scripts using preset heights?

PostPosted: Thu Sep 08, 2005 5:16 pm
Author: krackq
There are two sitting scripts that I know of in the toolset.. "sitdown" and "zep_use_chair". When sitting, is it always a fixed height? Raising or lowering the ojbect or invisible object or whatever is using those scripts does not change the sitting height. So, if you're trying to sit on an object that is taller than the preset height of those scripts, you'll always be sitting "in" the placeable or object, rather than on it. Is this always the case? Is there a way to raise the sitting height? I know another work around is to try and "sink" the placeable to coincide with the preset seating height.. but if that's not possible..? Any suggestions?


PostPosted: Thu Sep 08, 2005 5:24 pm
Author: Mothandric
Sitdown is a preset height, I found this today when trying to create giant-sized chairs. Even using an invisible object and raising the location the PC/NPC still sits at the fixed height, placing them inside the placeable.

PostPosted: Thu Sep 08, 2005 6:01 pm
Author: Fifty
Without looking at the sitdown script though, it must have a pre-programmed height at which things sit. That being the case, I would think it possible to write a different script which simply makes you sit at a different height. Thus, as long as you avoid having people's feet underground, you should be able to program people to sit at low, middle or high in three different scripts. This opens up the interesting possibility of being able to sit with your legs hanging off the edge of the Rock, if someone created an invisible sitting placeable there. You could also sit with just your feet dangling in the baths in the Romini/Canvas etc. Perhaps an option on the emote to create your own sitting placeable at various locations would enable you to sit practically anywhere. Someone clever enough probably could probably code something that would not even need to have a sitting placeable, you would just need to select which sit option you wanted, and where. The main difficulty would be dircetion, but I would imagine you coudl just line it up with the PC.

On the other hand, I can't script for shit, so I may be talking complete nonsense.

PostPosted: Thu Sep 08, 2005 6:02 pm
Author: Fifty
You could even have a "Sit very low" that only halflings and ganooms can use and which tells humans "This seat is too small for you"

PostPosted: Thu Sep 08, 2005 7:25 pm
Author: Czarcasm
ActionSit() is hardcoded into NWN, it's something you cannot change. You could MAYBE force them to sitdown then alter their location to match the new furniture, but it's not something I've tried.

PostPosted: Thu Sep 08, 2005 7:27 pm
Author: Fifty
So you can't access that script and make varisations of it? Again, I know nothing, just making idle conjecture.

PostPosted: Thu Sep 08, 2005 8:07 pm
Author: terror2001
One thing I've noticed, that I have not spent a lot of time looking into why it does this, is if you make an invisible object and tie say like "zep_use_chair" to the onUsed event the PC/NPC will only sit facing a particular direction, no matter where the invisible object's arrow is pointing. Anyone know why it does that, and/or how to make it so you sit facing the direction the arrow is pointing?

PostPosted: Thu Sep 08, 2005 8:17 pm
Author: Czarcasm
ActionSit is one of NWN's core functions, so there's no script to access or modify. Also, I was wrong in assuming you could change the Z position after sitting. The sit command remains in the PC's action queue until cleared and if the position of the PC is altered then the PC is forced to sit, he'll sit at the normal height. So we're stuck, but some one with more experience then me could refute that.

To terror2001: I've had similar problems before. Go back into the toolset and make sure they're facing the right direction then save, rebuild, and test again. I've had it do similar things before. It's not the script causing the problem, since it simply assigns the PC to sit at the chair's location, a script of three lines.

PostPosted: Thu Sep 08, 2005 8:25 pm
Author: Themicles
The height of someone sitting is determined by the animation files. There is nothing you can do to change it.

If a sitable is ALWAYS causing people to face East, then there are one of two things going on: It's one of the screwy ones, like the small stools, or the object is NOT flat with the ground. Make sure that a sitable is always at a Z of 0, or 10, or whatever the base elevation is at that tile.