Sitdown scripts using preset heights?

Moderator: Event DM

Post Reply
krackq
Demigod of Posts
Posts: 7598
Joined: Thu Jun 17, 2004 7:30 pm
Timezone: GMT-5
Location: Maryland, USA

Sitdown scripts using preset heights?

Post by krackq » Thu Sep 08, 2005 5:16 pm

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?

Thanks!!!!
Mothandric
Sage
Posts: 2163
Joined: Wed Jul 16, 2003 5:47 pm
Location: GMT +1

Post by Mothandric » Thu Sep 08, 2005 5:24 pm

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.
User avatar
Fifty
Demigod of Posts
Posts: 8831
Joined: Mon May 26, 2003 8:45 am
Location: London Town
Contact:

Post by Fifty » Thu Sep 08, 2005 6:01 pm

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.
Hovering around the edges of polite society
User avatar
Fifty
Demigod of Posts
Posts: 8831
Joined: Mon May 26, 2003 8:45 am
Location: London Town
Contact:

Post by Fifty » Thu Sep 08, 2005 6:02 pm

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"
Hovering around the edges of polite society
Czarcasm
Team Member; Retired with Honors
Posts: 1724
Joined: Tue Nov 09, 2004 2:55 pm
Timezone: GMT-6
Location: St. Louis, MO

Post by Czarcasm » Thu Sep 08, 2005 7:25 pm

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.
User avatar
Fifty
Demigod of Posts
Posts: 8831
Joined: Mon May 26, 2003 8:45 am
Location: London Town
Contact:

Post by Fifty » Thu Sep 08, 2005 7:27 pm

So you can't access that script and make varisations of it? Again, I know nothing, just making idle conjecture.
Hovering around the edges of polite society
User avatar
terror2001
Scholar
Posts: 1150
Joined: Wed Jun 22, 2005 1:48 am
Location: Colorado

Post by terror2001 » Thu Sep 08, 2005 8:07 pm

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?
Czarcasm
Team Member; Retired with Honors
Posts: 1724
Joined: Tue Nov 09, 2004 2:55 pm
Timezone: GMT-6
Location: St. Louis, MO

Post by Czarcasm » Thu Sep 08, 2005 8:17 pm

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.
User avatar
Themicles
CoPaP Ambassador
Posts: 2673
Joined: Wed Jan 29, 2003 10:45 pm
Location: Wolverine Lake, MI
Contact:

Post by Themicles » Thu Sep 08, 2005 8:25 pm

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.

-Themicles
A wise man does not dwell on his past. He learns from it, he grows from it, and then moves ahead into his future.

And some wise words from a wise man. :P
Orleron wrote:You have to excuse Themi. Tact, diplomacy, and softness are not his best traits, but he does not mean anything by his writing. He's a nice guy. You just get used to it after a while because he doesn't seem to learn. :)
Post Reply