How to set all dialouge values to true

Announcements, support questions, and discussion for the Dialogue System.
soniclinkerman
Posts: 82
Joined: Wed Mar 31, 2021 6:48 pm

Re: How to set all dialouge values to true

Post by soniclinkerman »

The squiggles are actually up here
Squiggles.png
Squiggles.png (363.51 KiB) Viewed 741 times
User avatar
Tony Li
Posts: 22163
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to set all dialouge values to true

Post by Tony Li »

Refer to that How To: Fix Code Editor Not Recognizing Dialogue System Namespace link again then.
soniclinkerman
Posts: 82
Joined: Wed Mar 31, 2021 6:48 pm

Re: How to set all dialouge values to true

Post by soniclinkerman »

I actually tried the last 2 of the options in that article but still nothing. I upgraded it and I didn't get the results I wanted. Idk if I should downgrade it. If you think that could fix it, I could try it out.

I didn't try the first option because

1. It gave an error regarding cinemachine

2. I realized solutions 2 and 3 were for Visual Studio which is what I'm using
User avatar
Tony Li
Posts: 22163
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to set all dialouge values to true

Post by Tony Li »

Try backing up your project and then downgrading the Visual Studio package in the Unity editor's Package Manager window. The issue isn't with the Dialogue System. The issue is that Unity isn't properly generating Visual Studio solutions that can see scripts in Plugins, and the Dialogue System just happens to be in Plugins.
soniclinkerman
Posts: 82
Joined: Wed Mar 31, 2021 6:48 pm

Re: How to set all dialouge values to true

Post by soniclinkerman »

Downgrading to 2.0.5 seemed to work!

No more squiggles.

I want to try this method you shared

Code: Select all

public class StopAllConversations : MonoBehaviour
{
    void OnConversationStart(Transform actor)
    {
        if (IsDemoMode())
        {
            DialogueManager.StopConversation();
        }
    }
}
I made a script and put this on my dialoguemanager. Instead of IsDemo, this should run ONLY when Timetrialmode is on.

I have this bool turn on when I click a button. Do I need to make this function public and then put this script in the "On Start" function and then make the parameter the player prefab to shut off all conversations in every scene?
User avatar
Tony Li
Posts: 22163
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to set all dialouge values to true

Post by Tony Li »

Hi,

It doesn't need to be public, and you don't need a Start() method. Just add the script to your Dialogue Manager GameObject.
soniclinkerman
Posts: 82
Joined: Wed Mar 31, 2021 6:48 pm

Re: How to set all dialouge values to true

Post by soniclinkerman »

Ok so I put this script on my dialogue manager, but get thrown with this error when I hit a trigger event
Error.png
Error.png (980.19 KiB) Viewed 736 times
soniclinkerman
Posts: 82
Joined: Wed Mar 31, 2021 6:48 pm

Re: How to set all dialouge values to true

Post by soniclinkerman »

*UPDATE*
So this error actually occurs regardless of what I do. Even if the dialogue is happening
User avatar
Tony Li
Posts: 22163
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to set all dialouge values to true

Post by Tony Li »

Hi,

Can you post your script here?
soniclinkerman
Posts: 82
Joined: Wed Mar 31, 2021 6:48 pm

Re: How to set all dialouge values to true

Post by soniclinkerman »

Sure

Code: Select all

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

public class StopAllConversations : MonoBehaviour
{
    private void OnConversationStart(Transform actor)
    {
        if (GetComponent<TimetrialManager>().isIntimeTrialMode)
        {
            DialogueManager.StopConversation();
        }
    }
}
Post Reply