NPCs Not Staying Seated OnConversation (EE) - [FIXED]

Is anyone else having issues with keeping NPCs seated during a conversation? The scripts work in v1.69, but not in EE.

I’m using the scripts posted here: https://nwn.fandom.com/wiki/Sit_on_spawn_and_sit_on_conversation

Fixed it - had to make a minor change in the scripts for EE:

// OnSpawn
#include "nw_o2_coninclude"
#include "x0_i0_walkway"

void main()
{
    // ***** BEGIN DEFAULT GENERIC BEHAVIOR (DO NOT TOUCH) ***** //
    SetListeningPatterns();
    WalkWayPoints();
    GenerateNPCTreasure();
    // ***** END DEFAULT GENERIC BEHAVIOR ***** //

    // Sit in the assigned chair.
    string sChairTag = "CHAIR_" + GetTag(OBJECT_SELF);
    object oChair = GetNearestObjectByTag(sChairTag);
    ActionSit(oChair);

    // GG - 4/8/20: Make sure the little bastard keeps sitting when clicked on
    SetCommandable(FALSE);
}

AND

// OnConversation
void main()
{
    //if(GetCommandable(OBJECT_SELF))
    if(!GetCommandable(OBJECT_SELF))
    {
        // Standard response, but clear actions *after* the conversation starts.
        BeginConversation();
        ClearAllActions();

        // Sit in the assigned chair.
        string sChairTag = "CHAIR_" + GetTag(OBJECT_SELF);
        object oChair = GetNearestObjectByTag(sChairTag);
        ActionSit(oChair);
    }
}
1 Like

That’s odd - my similar scripts still work in EE.

It shouldn’t be necessary to SetCommandable(FALSE).

When I get back to my desk I’ll check.

OnConversation I have this:

        if (GetCommandable(OBJECT_SELF))
        {
//            ClearActions(CLEAR_NW_C2_DEFAULT4_29);
            ClearAllActions(TRUE);
            // End custom
            BeginConversation();
            // Custom - remain seated 
            object oChair = GetLocalObject(OBJECT_SELF, "MyChair");
            if (GetIsObjectValid(oChair)) {ClearAllActions(); ActionSit(oChair);}
            // End Custom
        }

Alternatively, the sitting code can go in the Action Taken script of the first conversation line.

I didn’t notice any difference between 1.69 and EE in this respect.

My understanding is that conversation should not be permitted when the NPC is not commandable, by definition.

Sitting has always been a bit buggy. In the past, I have used EffectCutsceneImmobilize briefly, just before starting the conversation, but I suspect that’s unnecessary.

1 Like

Just tested yours and it works as expected half of the time. The other half of the time, the NPCs get up, do a lap around the tavern then sit back down. If I place the script in the ActionTaken of the first conversation node, the NPCs get up ALL the time, do a lap around the tavern then sit back down.

Not sure what’s going on because what you said about not being to converse when SetCommandable is FALSE on an NPC is my understanding as well. At least until yesterday. When I use SetCommandable(FALSE) in the OnSpawn and my version of the OnConversation, the NPCs stay in their chairs ALL the time.