This is the stacktrace of the second OnConversationLine call
OnConversationLine getting hit twice when conversation starts
Re: OnConversationLine getting hit twice when conversation starts
That looks correct. What is the stack trace of the first call?
Does this also happen with DemoScene1 when you talk to the NPC?
As a test, you can add a Conversation Logger component to the Dialogue Manager. It will log every event: OnConversationStart, OnPrepareConversationLine, OnConversationLine, etc.
Does this also happen with DemoScene1 when you talk to the NPC?
As a test, you can add a Conversation Logger component to the Dialogue Manager. It will log every event: OnConversationStart, OnPrepareConversationLine, OnConversationLine, etc.
Re: OnConversationLine getting hit twice when conversation starts
Ran a test on DemoScene1, and can confirm that OnConversationLine() is getting hit twice. Here are the traces for the first & second hits respectively.
First:
Second:
First:
Second:
Last edited by jlhacode on Wed Sep 23, 2020 10:54 pm, edited 1 time in total.
Re: OnConversationLine getting hit twice when conversation starts
Are you sure it's the same line? Remember that OnConversationLine() will also be called for the <START> node, which typically has no text.
If you're sure that the first OnConversationLine is not for the <START> node, please click on each stack trace in the Console window, press Ctrl+C to copy it to the clipboard, and then paste it into a reply. This will give me the script line numbers so I can determine exactly where it's calling OnConversationLine.
If you're sure that the first OnConversationLine is not for the <START> node, please click on each stack trace in the Console window, press Ctrl+C to copy it to the clipboard, and then paste it into a reply. This will give me the script line numbers so I can determine exactly where it's calling OnConversationLine.
Re: OnConversationLine getting hit twice when conversation starts
My mistake, it's definitely the start node causing that extra OnConversationLine. Thanks for the heads up!