Skip Button

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Niroan
Posts: 3
Joined: Sun Oct 18, 2020 1:38 pm

Skip Button

Post by Niroan »

Hello

I have made a button inside my Dialogue UI.
Its just called SKIP BUTTON and is right next to Continue Button.

This is the code:

Code: Select all

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using PixelCrushers.DialogueSystem;
using UnityEngine.UI;

public class SkipDialogueGameObject : MonoBehaviour
{
    //public GameObject DialogueUI;

    public void SkipDialogueFunction()
    {
        DialogueLua.SetVariable("ConversationIsOver", true);
        DialogueManager.instance.StopConversation();
       // DialogueUI.SetActive(false);
    }
}
But this makes all my other conversations not triggering?
I have several Conversations that trigger when enemies are killed.

How can i make this work? I JUST want to make a button so user can skip to end of conversation :)
User avatar
Tony Li
Posts: 21926
Joined: Thu Jul 18, 2013 1:27 pm

Re: Skip Button

Post by Tony Li »

Hi,

DialogueManager.instance.StopConversation() stops active conversations. It won't affect the starting of future conversations. Does it have something to do with "ConversationIsOver" variable? Is this variable preventing future conversations from starting?

Side note: You can use DialogueManager.StopConversation(), It's the same as DialogueManager.instance.StopConversation() but shorter.
Niroan
Posts: 3
Joined: Sun Oct 18, 2020 1:38 pm

Re: Skip Button

Post by Niroan »

Tony Li wrote: Tue Feb 23, 2021 8:22 am Hi,

DialogueManager.instance.StopConversation() stops active conversations. It won't affect the starting of future conversations. Does it have something to do with "ConversationIsOver" variable? Is this variable preventing future conversations from starting?

Side note: You can use DialogueManager.StopConversation(), It's the same as DialogueManager.instance.StopConversation() but shorter.
Hmm, but will this make the current dialogue to disappear and game will then start? I have pause when conversations is running. The Variable is variable im just using it for a courouting that is waiting for it to be true before i turn on the UI for rest of game :)

But when i use StopConversation in the buttom then the minions that have triggers is not displaying Dialogue UI its only pausing the game?

What could cause this?
User avatar
Tony Li
Posts: 21926
Joined: Thu Jul 18, 2013 1:27 pm

Re: Skip Button

Post by Tony Li »

I'm sorry; I don't understand.

When you call DialogueManager.StopConversation(), it will stop the active conversation. If a Dialogue System Trigger started the conversation, the Dialogue System Trigger will unpause the game.

If that information doesn't help, can you please post a screenshot, picture, or diagram to clarify the problem?
Post Reply