DLGPartySwap question

I have this set to TRUE in my campaign (well, module really, but I work in campaign mode). I like it that way. However, there is a rare instance in the module I’m working on now where I would like to temporarily, just this once, disable that. Is that possible without having to set DLGPartySwap to FALSE in the Campaign Editor?

Set the NPC’s ‘Can Talk to Non-Player Owned Creatures’ property to TRUE.
OR
Use the SetCanTalkToNonPlayerOwnedCreatures(oObj, TRUE) function for the NPC in a script.

2 Likes

@travus - I don’t know what’s going on. Even if this worked it causes very weird problems now. When I click on the object that is supposed to talk to the companion instead of the main PC (the placeable where I put Can Talk to Non-Player Owned Creatures to TRUE ) it speaks to the companion, BUT there is a script that is supposed to be run when clicking on the last node in the conversation. This script isn’t running. I put quite a few SendMessageToPC in there to see if it was actually running, and it was not. When switching back to Can Talk to Non-Player Owned Creatures to FALSE, the script was running again and I got all the SendMessageToPC debug messages.

I’d have to see the script.

hm, i wonder if this is where the “needs one more (blank) node in the conversation” thing happens.

@andgalf try adding a blank node after the node the script fires

@kevL_s - As a matter of fact this is a NWN2 style conversation, and I normally have a blank node at the end of such a conversation where I put the last script that’s suppose to run, but I hadn’t done that here for some reason. Could very well be what causes it. Thanks for pointing it out. I’ll try it now.

EDIT: Hmmm, ok. Now the script seems to run actually BUT I don’t get any of the SendMessageToPC. Could that be because I have it like this:

object oPC = GetFirstPC();

SendMessageToPC(oPC,"Script is running"); 

Maybe I need to set it to GetFirstPC(FALSE); since I at this time is controlling a companion? I thought that the game still would send such a message even if the PC isn’t controlled, but maybe that’s not how SendMessageToPC work?

EDIT2: Yes, the GetFirstPC(FALSE); did the trick. Now the script runs and everything works!

1 Like