Problem with a Speak Trigger

This is strange. I made a Speak Trigger (just like I’ve done many times) and placed it over the waypoint that I use to transition from one area to another. This way the trigger activates as soon as the PC enters. No big deal right? Well, for some reason the conversation does not fire. Instead it switched control to one of the NPCs and then . . . nothing. You can still go through the area but no conversation for that point. I do not know why this is happening. Any suggestions would be appreciated.

Can you post your script? Or is it the generic one for the stock speak trigger?

@Sawdust37

My guess would be that the target for the conversation was “lost” during the switch of the PC. I found that a small delay or even separating the call to start the conversation with the newly selected PC was required in some triggers. Also, just double-check the conversation properties.

However, as @travus says, posting your script will likely help more.

It’s the stock speak trigger. I’ve assigned the NPC_Tag as an NPC (not the one it is switching to), Conversation, Talk Now = 1, Cutscene Bars=1 and OnceOnly=1. In the conversation, the node speaker matches with the owner of the conversation.

The only anomaly, is that the trigger is placed at a -16 height, and the trigger perimeter (green) is floating above the surface of the baked ground perimeter (yellow). I don’t think that should be a problem however.

@Sawdust37

I do not have much experience using stock scripts, but you could try …

  1. Redraw the trigger and retest.
  2. Check the TAG of the NPC - Are they within range of the speaker?

Is the area bigger than previous ones? It may be that you need to delay the conversation slightly to ensure the PC has arrived “properly”. I have found the more you have going on in some areas, the more you may require delays to ensure events fire reliably.

Let us know how you get on.
Lance.

1 Like

When you enter the area, is it with companions? Or is it just the main character?

Yes to everything . . . meaning I checked those out. I will move the conversation in front of the spawn point and test that later (teaching right now). Thanks for the suggestion and will let you know how it goes.

With companions

Trying to read very thoroughly what you say in your first post…
Is this correct?

Your PC and the party teleports to the waypoint with the trigger, from another area, and when they arrive the conversation should start?

Correct.

Alright. I’ve had problems with this kind of thing before, I believe. And I also believe others having reported similar issues in the past. When teleporting to a trigger (that is supposed to trigger a conversation), a conversation doesn’t always start.

Ok, so what to do about it? I would use my own script for this and use CreateIpSpeaker. Whenever there’s a possibillity that a conversation doesn’t start I’ve found this the best way to do it. If a character walks into a trigger there are usually no problems, but teleporting…that’s another thing entirely. So I would skip the stock speak trigger for this and instead do my own script using CreateIpSpeaker. I guess you could also fix it with a delay, as Lance_Botelle suggests.

1 Like

Thanks. I have moved the conversation in front of the waypoint and will try that out. If not, I will use your advice and write the script as you suggested. I’m also looking closely at the conversation to see if there might be errors within it in the nodes. I’ll report back this evening when we finish with this wonderful thing called virtual teaching for the day. :grinning:

Sounds good. Here’s an example of a script that could work:

#include "ginc_ipspeaker"

void main()
{

object oPC = GetEnteringObject();

if(!GetIsPC(oPC)) return;

if(GetLocalInt(OBJECT_SELF,"Done")) return;

SetLocalInt(OBJECT_SELF,"Done",1);

CreateIPSpeaker("companion", "conversation", GetLocation(GetFirstPC()), 0.5f);

}

Or perhaps something like this:

void StartConversation()
{

object oCompanion = GetObjectByTag("companion");
object oPC = GetFirstPC();

AssignCommand(oCompanion, ActionStartConversation(oPC, "conversation", FALSE, FALSE, FALSE, FALSE));

}

void main()
{

object oPC = GetEnteringObject();

if(!GetIsPC(oPC)) return;

if(GetLocalInt(OBJECT_SELF,"Done")) return;

SetLocalInt(OBJECT_SELF,"Done",1);

DelayCommand(0.2, StartConversation());

}
1 Like

For all concerned . . . I did the most heinous of troubleshooting procedures . . . I changed multiple things before testing. I moved the trigger forward, deleted a “listener” reference in a node in one of the limbs and adjusted a couple of speakers. Now it is working. I appreciate all the suggestions. Now on to the next area.

1 Like

Just out of curiosity, now when you’ve got it working…did the characters still teleport directly to the trigger area or do they teleport outside and walk into the trigger area?

They teleport in and when the PC steps forward the trigger activates. I really should have done the troubleshooting by changing one thing at a time BUT at least its working now and I can progress forward.

1 Like

This is effectively the delay you needed to ensure all were “properly” present is my guess.

2 Likes

Probably. I just hate it when I don’t KNOW what the issue was. Well, I can always go back and set it up if I get curious. Thanks for the help.