'Self' Waypoint in Convo String

It’s easy to make npcs pop up near you/interact with you in scripts, where the pc is the waypoint, but is there a way besides no way point listed, to make them interact with you, using the ‘place’ convo string in a conversation line? (meaning you list the npc in string then if place is part of the line, what could you put there if the pc is ‘the waypoint’)? I tried entering nothing and the parties just acted where they were, no matter how far apart.

I’ve read through your post several times now and I still don’t get what you mean. What is the “place convo string” you’re talking about?
You want to be able to converse with npcs that aren’t there, aren’t near the PC? Why? I don’t get it.

Nothing to do with the conversation, only where the action that can be initiated in a conversation line occurs. I want the action to be able to take place anywhere the pc is. Easy on a script, and any conversation line/node that doesn’t have this in the line
image. When that appears in the convo line, and you leave it empty, whatever interaction you are commanding on the line (like shaking hands for ex.), so far, the npc and or pc just perform it where they are standing. I want the waypoint to be the pc (Like when you summon, using an object or a conversation). On interactions on conversation lines where that waypoint string box doesn’t appear, it’s usually default location ‘at the pc’, or the convo owner. Ironic you are confused, lol, but I know you get the pros to do some of your stuff for you (which is what I am trying to do here, at least get their input).

Is this NWN1 or NWN2?

Seems to me that you just need a script to put on a conversation line where the “place” is the PC. I’m still very confused at what you’re getting at here.
I mean, the “when that appears in a convo line”… it just means that the script you put on that conversation line has a string input for the sPlace. So just create a script where sPlace by default is where the PC is. Shouldn’t be that difficult, I think. Even I could do something like that.
I still have no idea what you are trying to do here. It wasn’t made clearer by your second post, sorry. You want (I think) to let NPCs interact with the PC if there’s no waypoint in the script that you put on the line in the conversation (or something)? I don’t believe that’s possible.

@Kamiryn - I believe we’re talking NWN2 here.

@kevL_s - Maybe you understand what @adam_ii323 is trying to say?

EDIT: Maybe script it something like this:

object oNPC = GetObjectByTag("npctag");
object oPC = GetFirstPC();
location ITarget = GetLocation(oPC);

im a bit confused too. Do you want a dialogactionscript that makes an NPC (the dialog owner) perform an animation close to and facing the PCSpeaker?

Glad I’m not the only one. I felt a bit stupid there not understanding what adam_ii323 was getting at.

Sorry if i didn’t make it clear. I simply was trying to make the waypoint required in a script on a convo line the PC. Kev L figured what I knew and was trying to avoid (just script it). The script already exists and clearly is designed to go to a specific waypoint; however, I want the interaction to be able to occur at the pc’s location anywhere, any time. For spawns, I already use

void main(string sLocationTag)
object oLocation = GetObjectByTag(sLocationTag);
if (!GetIsObjectValid(oLocation))
oLocation = OBJECT_SELF;
location lHuman = GetLocation(oLocation);

But for interactions, between the speaker and npc (such as a handshake), those scripts usu have this line = GetLocation(GetNearestObjectByTag(“”)); and the action takes place there. So based on what KevL said, I will try to reword the script so the pc is the waypoint. Believe me Andgalf, I’m no pro either, which is what I’m doing here asking! I try to find similar scripting to make it easier, but I have used that method before (leaving the sPlace blank) and the action was performed at the speaker/owner, between the speaker and the target npc.

something like this?

void main(string sLocationTag)
    object oLocation;
    if (sLocationTag != "")
        oLocation = GetObjectByTag(sLocationTag);
        oLocation = GetPCSpeaker();

    if (GetIsObjectValid(oLocation))
        location lHuman = GetLocation(oLocation);

        // ...

however, GetPCSpeaker() requires that the script run as a dialog script …

Getting PC location outside of a dialog script would be different …

1 Like

Thread moved to Neverwinter Nights 2.


1 Like

Yup this looks like it could work. I will try this (since the pc functions as a direction facing waypoint), I may have to add in a face speaker command, as the waypoint faces the pc in the interactions I would be using it for).

1 Like