Page 2 of 3

Re: How to set all dialouge values to true

Posted: Wed Apr 21, 2021 2:10 pm
by soniclinkerman
The squiggles are actually up here
Squiggles.png
Squiggles.png (363.51 KiB) Viewed 630 times

Re: How to set all dialouge values to true

Posted: Wed Apr 21, 2021 2:18 pm
by Tony Li
Refer to that How To: Fix Code Editor Not Recognizing Dialogue System Namespace link again then.

Re: How to set all dialouge values to true

Posted: Wed Apr 21, 2021 2:24 pm
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

Re: How to set all dialouge values to true

Posted: Wed Apr 21, 2021 3:03 pm
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.

Re: How to set all dialouge values to true

Posted: Thu Apr 22, 2021 10:48 am
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?

Re: How to set all dialouge values to true

Posted: Thu Apr 22, 2021 11:19 am
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.

Re: How to set all dialouge values to true

Posted: Thu Apr 22, 2021 11:40 am
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 625 times

Re: How to set all dialouge values to true

Posted: Thu Apr 22, 2021 1:16 pm
by soniclinkerman
*UPDATE*
So this error actually occurs regardless of what I do. Even if the dialogue is happening

Re: How to set all dialouge values to true

Posted: Thu Apr 22, 2021 1:21 pm
by Tony Li
Hi,

Can you post your script here?

Re: How to set all dialouge values to true

Posted: Thu Apr 22, 2021 1:33 pm
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();
        }
    }
}