detect end of dialog

Started by wynni2, Sat 19/05/2018 21:25:00

Previous topic - Next topic

wynni2

Hi all -

I'm making a custom speech system so that I have more control over the location of the speech GUI. 

Essentially I'd like the player's speech to appear in one part of the screen when they're simply talking and to appear in a different part of the screen when they're in dialog with someone.

It's easy enough to change the location of my speech GUI and launch a dialog in the same command.

However, I'm not sure how to change the location of the speech GUI when the dialog ends.  I'd really prefer not to enter a "ChangeSpeechGUIPosition" command at the end of every dialog.

Is there a game event that's triggered whenever a dialog stops?  Or is there a game variable that becomes true (for example) when a dialog is running?

Thanks

Crimson Wizard

#1
Quote from: wynni2 on Sat 19/05/2018 21:25:00
Hi all -

I'm making a custom speech system so that I have more control over the location of the speech GUI. 

Essentially I'd like the player's speech to appear in one part of the screen when they're simply talking and to appear in a different part of the screen when they're in dialog with someone.

First of all, to clarify, you are looking for event when character stops talking, or dialog ends?

Right now there is no built-in way to know when dialog ends, but it is possible to know when character is speaking (Character.Speaking property).

EDIT: This is ridiculous, engine itself has a variable that tracks dialog state, but it is not exposed to script.

wynni2

The specific question was when the dialog ends (ie, passes "exit").

My work around for was to add a bool called indialog. In repeatedly_execute indialog=false, and in dialog_repex (or whatever the custom dialog repeating function is called), indialog=true. It works.

SMF spam blocked by CleanTalk