Sit! Damn You!

Ello people. It is good to be with such excellent and admirable Vault Travellers this day… :blush:
I’ve a little query in mind if you’d be so kind as to listen to the disjointed ramblings I have in mind -
I want to initiate dialog via code by clicking on a placeable chair and having the PC stay seated during the entire conversation.
I just don’t know how to keep him seated, short of using the FREEZE_VFX. He will always “pop” up standing once dialog is initiated.
Doe’s anyone know how to do this?

code:

void main()
{

    object oPC = GetLastUsedBy();
    if ( !GetIsPC(oPC)) return;

    object oChair = OBJECT_SELF;

    AssignCommand(oPC, ActionSit(oChair));

    // Palli the parrot.    
    object oPalli = GetObjectByTag("PALLI_01");
    DelayCommand(1.5, AssignCommand(oPalli, 
    ActionStartConversation(oPC, "zc_palli")));
}

Tootles -

IIRC you need ActionSit immediately AFTER ActionStartConversation - certainly works for NPCs.

If the PC/NPC is already sitting, you will need to ClearAllActions before ActionStartConversation, otherwide the engine thinks it’s not time to start another action, because the sitting action is deemed to continue indefinitely. The result looks seemless - the sitter never seems to change position.

1 Like

Thanks for explaining the minutiae so well Proleric! Helps immensely.

What Proleric said. The reason this is necessary is because sitting is regarded as an action and it needs to terminate before the start-conversation action can take place. But once the conversation begins, the PC (or NPC) is once again free to sit because the start conversation action has ended.