Speech Bubbles Remaining Active Issue

Announcements, support questions, and discussion for the Dialogue System.
jae026
Posts: 51
Joined: Wed Apr 15, 2020 10:22 pm

Re: Speech Bubbles Remaining Active Issue

Post by jae026 »

OK thanks. I figured I was going down the wrong path.
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Speech Bubbles Remaining Active Issue

Post by Tony Li »

Glad to help. It's simpler than the path you were taking.
jae026
Posts: 51
Joined: Wed Apr 15, 2020 10:22 pm

Re: Speech Bubbles Remaining Active Issue

Post by jae026 »

Hey im back lol. I am having an issue where I activate one object and deactivate another but only one fires. I tried the same sequence code in its own node and it works fine but combined only one fires.

Also is it possible when using a key to progress a conversation ( UI Button Key Trigger ) to have it disabled until the text is typed on? I have a conversation where a character walks over but if you pres the button it skips to the next node and the character jumps to the position instead of finishing the move. I kind of whan to make all sequences unskippable and not able to fast forward
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Speech Bubbles Remaining Active Issue

Post by Tony Li »

Hi,
jae026 wrote: Tue Apr 28, 2020 12:04 pmHey im back lol. I am having an issue where I activate one object and deactivate another but only one fires. I tried the same sequence code in its own node and it works fine but combined only one fires.
What's the combined sequence? Are the commands separated by a semicolon? For example:

Code: Select all

SetActive(OneObject, true);
SetActive(AnotherObject, false)
jae026 wrote: Tue Apr 28, 2020 12:04 pmAlso is it possible when using a key to progress a conversation ( UI Button Key Trigger ) to have it disabled until the text is typed on? I have a conversation where a character walks over but if you pres the button it skips to the next node and the character jumps to the position instead of finishing the move. I kind of whan to make all sequences unskippable and not able to fast forward
Inspect the subtitle text's typewriter effect script. Configure the OnBegin() event to disable the UIButtonKeyTrigger component. Configure OnEnd() to re-enable it.

Then also use these commands in your sequence:

Code: Select all

SetContinueMode(false);
...
required SetContinueMode(original)@Message(Typed)
The first line disables the continue button so the player can't click it with the mouse. The last line re-enables it when the typewriter effect has finished.

Example use:

Code: Select all

SetContinueMode(false);
AnimatorPlay(Salute);
AudioWait(hello_sir);
required SetContinueMode(original)@Message(Typed)
jae026
Posts: 51
Joined: Wed Apr 15, 2020 10:22 pm

Re: Speech Bubbles Remaining Active Issue

Post by jae026 »

Thanks for all your help but I am back again lol. Currently I am using "Space" to interact "On Use" with triggers, NPS and such to start conversations. However I am running into an issue where If I press space to start a conversation If I press space again it retriggers the conversation and wierds out. I have UI Button Trigger set to Left Ctrl to progress conversation but sometimes I press "space" and it messes everything up. This happens regardless of the condition. I even tried toggling off the proximity selector on conversation start but that doesn't help. Any tips? I just want to press space to start the conversation, left ctrl to progress it and have space do nothing while in conversation.
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Speech Bubbles Remaining Active Issue

Post by Tony Li »

Hi,

It sounds like the ProximitySelector isn't actually being disabled during conversations. Keep an inspector view on the ProximitySelector component. When you start the conversation, check to see if it's really disabled.

If it's not disabled, it's probably because the Dialogue System Events component is on a GameObject that isn't receiving OnConversationStart and OnConversationEnd messages. Set the Dialogue Manager's Debug Level to Info. Then start the conversation again. You should see a line like this:

Dialogue System: Starting conversation 'XXX' with actor=AAA and conversant=BBB.

where AAA and BBB are GameObjects. Only these GameObjects and their children, and the Dialogue Manager, will receive the OnConversationStart/End messages.
jae026
Posts: 51
Joined: Wed Apr 15, 2020 10:22 pm

Re: Speech Bubbles Remaining Active Issue

Post by jae026 »

Can you point me in the right direction in regards to writing a Method that can call a sequence command. Example being if I decided to have a teleport function that was like say (not real code just thinking as i type)

Code: Select all


void SomeMethod(String [b]TargetPosition[/b])
{
DialogueManager.PlaySequence("Fade(stay, 2)")->Message(Arrived);
Teleport([b]TargetPosition[/b](1))@Message(Arrived);
Fade(in, 1)@2.5;
}


Wondering if i could have this method live on something and call it when needed and just supply the target location instead of calling it from a node.

Does this make sense
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Speech Bubbles Remaining Active Issue

Post by Tony Li »

Something like this would work:

Code: Select all

void SomeMethod(string TargetPosition)
{
    DialogueManager.PlaySequence("Fade(stay, 2); " +
        "Teleport(" + TargetPosition + ")->Message(Arrived); " +
        "Fade(in, 1)@Message(Arrived); ");
}
jae026
Posts: 51
Joined: Wed Apr 15, 2020 10:22 pm

Re: Speech Bubbles Remaining Active Issue

Post by jae026 »

Tony Li wrote: Thu Apr 30, 2020 8:44 pm Something like this would work:

Code: Select all

void SomeMethod(string TargetPosition)
{
    DialogueManager.PlaySequence("Fade(stay, 2); " +
        "Teleport(" + TargetPosition + ")->Message(Arrived); " +
        "Fade(in, 1)@Message(Arrived); ");
}

I am back again. This time I think it is much simpler. I now have a few different animations. Idle, Walk and Talk. The walk and idle are controllered by a speed var in the Animator. Speed > 0 then play walk else play idle. Pretty Simple.

Problem is that when I start a conversation (Dialogue Systems Event Component) I disable the Character controller script and the player so the player cant move. This causes the walk animation to continue to play but the player is indeed unable to move. I then tried setting the speed to 0, then disabling the Character controller script. This causes the player to stop moving and freezes the characters idle animtion once the dialogue text appears. Never even completing a the animation cycle. The animation is set to loop so I thought it should at least play it once.

So, I tried Setting the speed to 0, Disabling The Controller and even telling the Animator to play Idle during Conversation Start. Even in the node at the start of the conversation it still freezes the animation once the text appears.

I also tried making it the Dialogue Managers Default sequence but that did not work either. I am not pausing the game during conversations either. This is a conversation that happens OnStart so it is already playing the Idle animation which means it should keep looping until either the talk animation (not implemented) is called or the player has control returned and can move, but it does not.

Here is a snapshot :
Attachments
Animation Error.png
Animation Error.png (915.4 KiB) Viewed 888 times
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Speech Bubbles Remaining Active Issue

Post by Tony Li »

Hi,

In general, you never want to set an Animator component's speed to zero. For example, this code would set an Animator component's speed to zero:

Code: Select all

GetComponent<Animator>().speed = 0; // You probably DON'T want to do this.
Are you talking about an animator parameter named "Speed"? If so, then yes, you will want to set this to zero. For example, this code would set the "Speed" parameter to zero:

Code: Select all

GetComponent<Animator>().SetFloat("Speed", 0);
A common setup is to disable the character controller script and set the "Speed" parameter to zero. The bottom of the Interaction Tutorial has an example of doing this:

Image

Please read the explanation in the Interaction Tutorial to understand how the screenshot above is set up.
Post Reply