Chair script

Information and Discussion Relating to NWN2 Scripting and Coding

Moderators: Moderator, Developer, DM

7threalm
Retired Staff
Posts: 1952
Joined: Fri Jan 04, 2013 2:44 am

Chair script

Unread post by 7threalm »

Can any one direct me to sitting script
Duragin Balderden(Battle Rager of Kraak Helzak)

Rlyd (Drow Wizard)- Fearn School of Enchantment and Charm
Luna
Retired Admin
Posts: 7945
Joined: Sat May 16, 2009 3:00 pm

Re: Chair script

Unread post by Luna »

We use Kemo chairs.
Shall I send them to you?
7threalm
Retired Staff
Posts: 1952
Joined: Fri Jan 04, 2013 2:44 am

Re: Chair script

Unread post by 7threalm »

yes thank you
Duragin Balderden(Battle Rager of Kraak Helzak)

Rlyd (Drow Wizard)- Fearn School of Enchantment and Charm
User avatar
gedweyignasia
Custom Content
Posts: 1353
Joined: Sat Nov 23, 2013 11:27 pm
Location: EST/UTC-4

Re: Chair script

Unread post by gedweyignasia »

Can I get a copy of that?
Luna
Retired Admin
Posts: 7945
Joined: Sat May 16, 2009 3:00 pm

Re: Chair script

Unread post by Luna »

User avatar
gedweyignasia
Custom Content
Posts: 1353
Joined: Sat Nov 23, 2013 11:27 pm
Location: EST/UTC-4

Re: Chair script

Unread post by gedweyignasia »

Is that the exact one we use, no tweaks?
User avatar
gedweyignasia
Custom Content
Posts: 1353
Joined: Sat Nov 23, 2013 11:27 pm
Location: EST/UTC-4

Re: Chair script

Unread post by gedweyignasia »

The KEMO implementation you linked to includes this note:
* works around the PW "feature" where PCs entering an area cannot see the poses of other PCs who are already sitting down; players no longer have to re-sit every time someone new walks into the tavern

Is it possible we broke this script somehow on our server? Can we fix it?

EDIT: Looks like the relevant line of code is the last line in gui_kemo_chair_anim
AssignCommand(oPC,AnimationLoop(oPC, lChairLoc));

It should also be possible to fix the issue with players spinning to face EAST when re-sitting on barrels by tweaking SetChairFacing() in kemo_includes and adding a check in kemo_chair to prevent the player from moving to the chair if they're already within some small distance of the chair's location (to account for floating-point error).
Luna
Retired Admin
Posts: 7945
Joined: Sat May 16, 2009 3:00 pm

Re: Chair script

Unread post by Luna »

I'll diff whats on the vault to what we have and take a look.
Thanks
User avatar
gedweyignasia
Custom Content
Posts: 1353
Joined: Sat Nov 23, 2013 11:27 pm
Location: EST/UTC-4

Re: Chair script

Unread post by gedweyignasia »

If you're okay sharing our code, I'd like to take a peek at all of our kemo_chair scripts and see how we've tweaked them. (Learning experience!)
Luna
Retired Admin
Posts: 7945
Joined: Sat May 16, 2009 3:00 pm

Re: Chair script

Unread post by Luna »

gedweyignasia wrote:EDIT: Looks like the relevant line of code is the last line in gui_kemo_chair_anim
AssignCommand(oPC,AnimationLoop(oPC, lChairLoc));
We are running the stuff from nwn2 vault.
No differences found.

Maybe it's just a bugged function from nwn2.
User avatar
LISA100595
Retired Staff
Posts: 5202
Joined: Mon Aug 22, 2011 12:23 pm

Re: Chair script

Unread post by LISA100595 »

When in doubt, blame Obsidibug. :P
Lady Elvina Aira-S'efarro - The Order of the Silver Rose
Salaria - Bounty Hunter half-sister of Darius Brothers
Angelina Northstar - Holy Warrior of Tyr / Knight of the Silver Rose
Matilda Stonehold - Honorable Sheild Dwarf
Loriah Swift - Morninglord of Lathander
User avatar
gedweyignasia
Custom Content
Posts: 1353
Joined: Sat Nov 23, 2013 11:27 pm
Location: EST/UTC-4

Re: Chair script

Unread post by gedweyignasia »

AnimationLoop() is a function in kemo_include to fire off the animation every 48 seconds on a heartbeat, not a function from Obsidian. It was specifically written to fix the re-sit issue according to the comments.
Luna
Retired Admin
Posts: 7945
Joined: Sat May 16, 2009 3:00 pm

Re: Chair script

Unread post by Luna »

gedweyignasia wrote:AnimationLoop() is a function in kemo_include to fire off the animation every 48 seconds on a heartbeat, not a function from Obsidian. It was specifically written to fix the re-sit issue according to the comments.
Maybe it doesn't work?
User avatar
gedweyignasia
Custom Content
Posts: 1353
Joined: Sat Nov 23, 2013 11:27 pm
Location: EST/UTC-4

Re: Chair script

Unread post by gedweyignasia »

This is possible, but looking through the code it seems like it should. They also have an older version commented out in favor of the pretty solution someone else sent them. I'll search around, see if anyone else is having these issues.

Return to “NWN2 Scripting”