I usually use the gp_talk_door too when I want to converse with placeables, but I tend to put it on the OnUsed slot instead. This situation with a door is a bit different though. You have to make sure you aren’t teleported anywhere by mistake.
EDIT: One thing I noticed with further testing was that if I controlled a companion who’s a rogue and that one tried to unlock the door, and then failed, the conversation wouldn’t start. I haven’t tried with a PC who’s rogue so that makes me wonder if that would be a problem…
EDIT2: Tested it, and it’s indeed a problem. I think I did something like this in my second module. I’ll have to look at that and see how I went about things there…
EDIT3: I hate this. Apparently I used gp_talk_object on the OnFailedToOpen. I was hoping to not have to use that. I have my own script that doesn’t use the GetLastUsedBy. Do you really have to use that? OK, I think I’ll have to (reluctantly) post my script here again then. Maybe you have some insight into what I’m doing wrong, and how I must do things to make it work:
#include "ginc_companion"
void DamnDelays(object oCompanion)
{
object oPC = GetFirstPC(FALSE);
object oPC1 = GetFirstPC();
object oCavedoor = GetObjectByTag("i3caveds");
if(!GetGlobalInt("AnswerRunes") && !GetLocalInt(OBJECT_SELF,"TalkCaveEntrance"))
{
object oFM = GetFirstFactionMember(oPC1);
while(GetIsObjectValid(oFM))
{
AssignCommand(oFM, ClearAllActions());
AssignCommand(oFM, ActionJumpToObject(oPC));
oFM = GetNextFactionMember(oPC1, FALSE);
}
SetLocalInt(OBJECT_SELF,"TalkCaveEntrance",1);
DelayCommand(0.2,AssignCommand(oCompanion, ActionStartConversation(oPC1, "c_i3_cavedoor", FALSE, FALSE, TRUE, FALSE)));
}
else if(GetGlobalInt("AnswerRunes")&& !GetLocalInt(OBJECT_SELF,"TalkCaveEntranceAgain"))
{
object oFM = GetFirstFactionMember(oPC1);
while(GetIsObjectValid(oFM))
{
AssignCommand(oFM, ClearAllActions());
AssignCommand(oFM, ActionJumpToObject(oPC1));
oFM = GetNextFactionMember(oPC1, FALSE);
}
SetLocalInt(OBJECT_SELF,"TalkCaveEntranceAgain",1);
DelayCommand(0.2,AssignCommand(oCompanion, ActionStartConversation(oPC1, "c_i3_cavedoor", FALSE, FALSE, TRUE, FALSE)));
}
else if(GetGlobalInt("AnswerRunes")&& GetLocalInt(OBJECT_SELF,"TalkCaveEntranceAgain"))
{
SetLocked(oCavedoor,FALSE);
JumpPartyToArea(oPC1, GetWaypointByTag("intothecave"));
}
}
void main()
{
object oPC1 = GetFirstPC();
object oCavedoor = GetObjectByTag("i3caveds");
//SendMessageToPC(oPC1,"The script is now running");
if(GetIsInCombat(oPC1)) return;
string sCompanion = GetFirstRosterMember();
while(!GetIsRosterNameInParty(oPC1,sCompanion))
{
sCompanion = GetNextRosterMember();
}
object oCompanion = GetObjectByTag(sCompanion);
DelayCommand(0.2,DamnDelays(oCompanion));
}
EDIT4: Rant: Apparently this is impossible for some reason! Gawd darn I hate this game sometimes! Alright, seems like I have to do it the dumb way (the only way the game wants to do it) by taking my conversation and add in all potential companions in the dialogue and check each and every one of those there instead. I would have wanted my slick way of just checking what companions are in the party and let one of them be the owner of the conversation, but no, no, it HAS to be the object that’s the conversation owner otherwise it doesn’t work! That’s how NWN2 wants to do things. FINE!