Bit o' code
I borrowed a chunk of this from the bioware forums, but a guy I correspond with asked for it. It's code I use to fire off a conversation with a party member. It avoids the speaktrigger issue that occurs if you try to start a conversation with an NPC that's not in the area where the trigger is laid down. I'd give credit to the gentlemen I borrowed from but I didn't bookmark the thread and don't recall who it was. (Sorry and thank you who ever you are)
This could be modified to handle the speaker and conversation name as a variable but I haven't bothered.
This could be modified to handle the speaker and conversation name as a variable but I haven't bothered.
#include "ginc_companion"
//void main(string sCompanionRosterName, string sConversation)
void main ()
{
string sCompanionRosterName= "co_navio";
string sConversation = "test02";
object oPC = GetEnteringObject();
object oTalker = GetObjectByTag(sCompanionRosterName);
//CHECK TO SEE PERSON WHO TRIGGERED IS PLAYER
//AND TARGET IS A COMPANION IN THE PARTY
if( GetIsPC(oPC) && IsInParty(sCompanionRosterName))
{
AssignCommand(oTalker, ActionStartConversation(oPC, sConversation, FALSE, FALSE, TRUE, FALSE ));
DestroyObject(OBJECT_SELF);
}
}
I'm still curious about the speaktrigger issue you mention because I've never encountered it. I have a speaktrigger in one of my forest areas, for instance, that triggers a conversation with a companion who is not present in the area until you arrive with her in your party. It has never given me any problems. Maybe a patch has fixed the issue?
ReplyDeletePerhaps it was fixed in a patch, that would be outstanding. When I built keep on the borderlands, it corrupted several areas in my module. Perhaps I'll give it a test. I like the speaktrigger and it would save me a bunch of trouble if the issue has been worked out.
ReplyDeleteIt caused so much pain for me I've avoided it like the plague. If it's working for you, I be it was fixed in 1.0.6, I was trying to watch for that, but don't recall seeing it in the release notes.
Thanks for the heads up.
I think the other issue was if you changed a speaktrigger parameter and put an incorrect value in, a string where you need and int, it would tank too... perhaps that's been addressed as well.
Thanks again.