The last call to SetFacingPoint is not causing the conversation owner to turn and face oReal. I’m not locking the facing, so it is unclear why this is happening. I also tried ga_face_target, but no luck.
when i was playing around with dialog scripts (extensively with andgalf recently) I got the impression that the engine has a hard-coded “dialog manager” of some sort – and that one of its duties is to set Speaker’s facing on each node after action/conditional scripts fire. (also the Listener’s or PCSpeaker’s facing etc). iirc, a script can subsequently force the Speaker’s facing if you wrap SetFacingPoint() in a DelayCommand()
that is, let the engine set the speaker’s default facing, then force the facing to a different point when the delayed command runs a splitsecond later,
at least this worked for generic listeners and speakers, I didn’t try it for the dialog owner itself … /she was incapacitated.
Basically, just to reiterate what KevL said. Use a slight delay due to system automatically setting direction on node at the same time. You want to make your choice take effect just after the automatic one.
Strange … Again, as KevL said, it works elswehere … Just a few thoughts …
Did you try the smaller delay of 0.1 instead of 0.5?
Do you have any other animations trying to start on the node you apply the facing?
An obvious, but I’ll ask … The conversation owner is the creature and not an iPoint.
There are no other ClearActions firing on subsequent nodes?
Although you are not locking, apply an unlock function call anyway.
I think the bottom line is that you have to take control of the conversation environment by using more functions than may first be considered due to the game engine “doing stuff” during a conversation. So adding extra functions like orient locks and clearing actions may be required even when we think not.
I’ll keep reading.
Cheers, Lance.
And here is my amended function if you want to try it … Never failed me yet: alb_conv_partytalk
////////////////////////////////////////////////////////////////////////////////////////////////
// FACE SPEAKER CONVERSATION WRAPPER
// FORCE ALL PARTY MEMBERS TO FACE THE CONVERSATION OWNER (OR sObjTag OBJECT IF SUPPLIED)
// ADDED iNPCFACEPCs PARAMETER TO FORCE NPC TO FACE PARTY (E.g. Sebastion Rewilder in Jail)
// ADDED sObjTagFaces TO FORCE sObjTag TO LOOK AT SOMETHING ELSE (NOW CONV OWNER BY DEFAULT)
////////////////////////////////////////////////////////////////////////////////////////////////
void PartyFaceSpeaker(object oPartyMember, object oSpeaker, string sObjTagFaces);
void PartyFaceSpeaker(object oPartyMember, object oSpeaker, string sObjTagFaces)
{
vector vTarget = GetPosition(oSpeaker);
// WHO THE SPEAKER FACES (DEFAULT THE CONVERSATION OWNER)
object oSpeakerFaces = OBJECT_SELF;
if(sObjTagFaces != ""){oSpeakerFaces = GetObjectByTag(sObjTagFaces);}
vector vTargetListener = GetPosition(oSpeakerFaces);
object oFM = GetFirstFactionMember(oPartyMember, FALSE);
while(oFM != OBJECT_INVALID)
{
SetOrientOnDialog(oFM, TRUE);
// ALL PARTY FACE PARTY SPEAKER
if(oFM != oSpeaker)
{
AssignCommand(oFM, SetFacingPoint(vTarget, 1));
}
else
{
AssignCommand(oFM, SetFacingPoint(vTargetListener, 1));
}
// BUT PARTY SPEAKER STAYS FACING CONV OWNER (AS THEY ADDRESS THEM)
oFM = GetNextFactionMember(oPartyMember, FALSE);
}
}
////////////////////////////////////////////////////////////////////////////////////////////////
// FACE SPEAKER CONVERSATION WRAPPER
// FORCE ALL PARTY MEMBERS TO FACE THE CONVERSATION OWNER (OR sObjTag OBJECT IF SUPPLIED)
// ADDED iNPCFACEPCs PARAMETER TO FORCE NPC TO FACE PARTY (E.g. Sebastion Rewilder in Jail)
// ADDED sObjTagFaces TO FORCE sObjTag TO LOOK AT SOMETHING ELSE (NOW CONV OWNER BY DEFAULT)
////////////////////////////////////////////////////////////////////////////////////////////////
void main(string sObjTag = "", int iNPCFACEPCs = 0, string sObjTagFaces = "")
{
object oPC = GetPCSpeaker();
object oSpeaker = OBJECT_SELF;
// TAG OBJECT OVERRIDE
if(sObjTag != ""){oSpeaker = GetNearestObjectByTag(sObjTag, oPC, 1);}
// NPC FACE PARTY INTERCEPT
if(iNPCFACEPCs == 1)
{
SetOrientOnDialog(oPC, TRUE);
vector vTarget = GetPosition(oPC);
AssignCommand(oSpeaker, ClearAllActions(TRUE));
AssignCommand(oSpeaker, SetFacingPoint(vTarget, 1));
}
// APPROPRIATE DELAY
DelayCommand(0.1, PartyFaceSpeaker(oPC, oSpeaker, sObjTagFaces));
}
It’s posted up above, which is essentially from a NWN script. Basically it’s the facing of two NPCs who are having conversations with each other and with the PC, so they periodically flip their facing between each other to argue and then with player.
Lance: For the specific conversation nodes I turned off the Animations pick, set the Node delay to a non-zero interval, and set the ga_face_target lockOrientation fields to 1.