Adding sound to dialogues
Re: Adding sound to dialogues
Ah, I see, thanks so much! Works perfectly now.
And I just found a solution for the 'continue' button too. I just disactivated the child of the gameobject and that works.
Thanks again for the great support! have a nice day
And I just found a solution for the 'continue' button too. I just disactivated the child of the gameobject and that works.
Thanks again for the great support! have a nice day
Re: Adding sound to dialogues
Glad to help!
Re: Adding sound to dialogues
Oh, I do have one additional question that just came up (sorry).
Ever since I previously changed the 'Dialogue Manager' Settings like recommended earlier:
2. Tick Subtitle Settings > Show PC Subtitles During Line
3. Untick Input Settings > Always Force Response Menu
..which fixed the issue of player sounds playing too late, while NPC comments were running already. But since I did that change, all actions in the Sequence get executed on first click, whereas before they would execute once that bit of dialogue was completed.
So for ex. if I had a 'SetActive' action on the last dialogue box of a conversation, it would execute after the final click, when the dialogue boxes closed and disappared from the screen. Now the actions execute on the click before the final click, so while the convo is still technically opened on the screen. Do you see what I mean?
There is for ex. text that is supposed to appear on the screen once the dialogues are completed, that is a UI object I activate with SetActive, but now it displays while the final dialogue box of the convo is running.
Is there a way around this?
Thanks again
Ever since I previously changed the 'Dialogue Manager' Settings like recommended earlier:
2. Tick Subtitle Settings > Show PC Subtitles During Line
3. Untick Input Settings > Always Force Response Menu
..which fixed the issue of player sounds playing too late, while NPC comments were running already. But since I did that change, all actions in the Sequence get executed on first click, whereas before they would execute once that bit of dialogue was completed.
So for ex. if I had a 'SetActive' action on the last dialogue box of a conversation, it would execute after the final click, when the dialogue boxes closed and disappared from the screen. Now the actions execute on the click before the final click, so while the convo is still technically opened on the screen. Do you see what I mean?
There is for ex. text that is supposed to appear on the screen once the dialogues are completed, that is a UI object I activate with SetActive, but now it displays while the final dialogue box of the convo is running.
Is there a way around this?
Thanks again
Re: Adding sound to dialogues
You can add timing to the SetActive() command. Here is the more complicated but most accurate way:
Let's say you want to play this audio file:
AudioWait(Voice Overs/Bacterias 1/1)
and you want to set a GameObject named "Foo" active:
SetActive(Foo)
Use this to set "Foo" active after the audio has finished:
AudioWait(Voice Overs/Bacterias 1/1)->Message(Done);
SetActive(Foo)@Message(Done)
This will play the audio file. When the audio file is done, it will send a message "Done". (This can be any string of your choosing.) The next line will wait until it receives the message "Done". Then it will run the SetActive() command.
Let's say you want to play this audio file:
AudioWait(Voice Overs/Bacterias 1/1)
and you want to set a GameObject named "Foo" active:
SetActive(Foo)
Use this to set "Foo" active after the audio has finished:
AudioWait(Voice Overs/Bacterias 1/1)->Message(Done);
SetActive(Foo)@Message(Done)
This will play the audio file. When the audio file is done, it will send a message "Done". (This can be any string of your choosing.) The next line will wait until it receives the message "Done". Then it will run the SetActive() command.
Re: Adding sound to dialogues
Thanks for your answer.
Unfortunately this does not work. It does not activate the UI object with this code
https://ibb.co/55MNQ8P
It would be even better though, if the gameobject would be set active after clicking away from the convo, but there is no way of doing that in the Sequence without changing the Dialogue Manager Settings I currently have?
Thanks again
Unfortunately this does not work. It does not activate the UI object with this code
https://ibb.co/55MNQ8P
It would be even better though, if the gameobject would be set active after clicking away from the convo, but there is no way of doing that in the Sequence without changing the Dialogue Manager Settings I currently have?
Thanks again
Re: Adding sound to dialogues
(See my other answer below. If you prefer that solution, you can skip this.)FunD wrote: ↑Wed May 29, 2019 1:53 pmUnfortunately this does not work. It does not activate the UI object with this code
https://ibb.co/55MNQ8P
Are there any warnings in the Console?
Is the GameObject "UI Text" spelled exactly like that, including capitalization? And is its root GameObject active?
You can add a Dialogue System Trigger to conversation's actor or conversant. If the GameObject already has a Dialogue System Trigger, this will simply be second Dialogue System Trigger on the same GameObject. Set it to OnConversationEnd. Select Add Action > OnExecute() event. Configure the OnExecute() event to activate the UI Text GameObject.
Re: Adding sound to dialogues
Hi,
There are no errors in the console appearing. Just the object doesn't get activated like it should. And yes, it's spelled correctly, as soon as I remove @Message(Done) it works again
I think you've sort of lost me on the second part. My conversations are triggered via Playmaker. It gets launched with a trigger, yes.
Set it to OnConversationEnd -> are we still talking about Sequence? or where do I put this?
Add Action > OnExecute() event. Configure the OnExecute() event to activate the UI Text GameObject. -> where do I select 'add action'? I've only used the Sequence so far
There are no errors in the console appearing. Just the object doesn't get activated like it should. And yes, it's spelled correctly, as soon as I remove @Message(Done) it works again
I think you've sort of lost me on the second part. My conversations are triggered via Playmaker. It gets launched with a trigger, yes.
Set it to OnConversationEnd -> are we still talking about Sequence? or where do I put this?
Add Action > OnExecute() event. Configure the OnExecute() event to activate the UI Text GameObject. -> where do I select 'add action'? I've only used the Sequence so far
Re: Adding sound to dialogues
Hi,
In this example, the conversation "Private Hart" is triggered by a Dialogue System Trigger that's set to On Use, not by a PlayMaker action. But that's not important.
The important piece is the second Dialogue System Trigger, which is set to On Conversation End. When the conversation ends, it will activate the UI Text GameObject.
However, this will only work if the Dialogue System Trigger's GameObject is assigned as the Conversation Actor or Conversation Conversant. In your PlayMaker action, make sure the GameObject is assigned to one or the other of these fields. (In the example above, you may notice that the On Use Dialogue System Trigger's Conversation Conversant is unassigned. When this field is unassigned, the Dialogue System Trigger uses its own GameObject as the Conversation Conversant.)
Maybe there's an issue in the first line of the sequence. Here is the sequence in a better font:
Code: Select all
AudioWait(Voice Overs/Bacterias 1/1)->Message(Done);
SetActive(Foo)@Message(Done)
Here's an example:FunD wrote: ↑Wed May 29, 2019 5:59 pmI think you've sort of lost me on the second part. My conversations are triggered via Playmaker. It gets launched with a trigger, yes.
Set it to OnConversationEnd -> are we still talking about Sequence? or where do I put this?
Add Action > OnExecute() event. Configure the OnExecute() event to activate the UI Text GameObject. -> where do I select 'add action'? I've only used the Sequence so far
In this example, the conversation "Private Hart" is triggered by a Dialogue System Trigger that's set to On Use, not by a PlayMaker action. But that's not important.
The important piece is the second Dialogue System Trigger, which is set to On Conversation End. When the conversation ends, it will activate the UI Text GameObject.
However, this will only work if the Dialogue System Trigger's GameObject is assigned as the Conversation Actor or Conversation Conversant. In your PlayMaker action, make sure the GameObject is assigned to one or the other of these fields. (In the example above, you may notice that the On Use Dialogue System Trigger's Conversation Conversant is unassigned. When this field is unassigned, the Dialogue System Trigger uses its own GameObject as the Conversation Conversant.)
Re: Adding sound to dialogues
Yes, the second approach works!! yay!
Thanks so much, for the clear instructions
This approach was new to me, I haven't used 'Dialogue System Trigger (Script)' before, since I was using Playmaker, but this is really useful!
Have a nice day
Thanks so much, for the clear instructions
This approach was new to me, I haven't used 'Dialogue System Trigger (Script)' before, since I was using Playmaker, but this is really useful!
Have a nice day
Re: Adding sound to dialogues
Glad to help!
I should have also mentioned that you could accomplish the same thing with a PlayMaker Events component instead of a Dialogue System Trigger set to On Conversation End. But personally in this case I think it's simpler to use a Dialogue System Trigger.
I should have also mentioned that you could accomplish the same thing with a PlayMaker Events component instead of a Dialogue System Trigger set to On Conversation End. But personally in this case I think it's simpler to use a Dialogue System Trigger.