Page 2 of 2

Re: Newbie needing help!

Posted: Mon Jul 16, 2018 8:39 pm
by jeremycards
No problem, I didn't give you time to do so! =P Thanks for the response anyway.

Re: Newbie needing help!

Posted: Wed Jul 18, 2018 2:28 am
by jeremycards
Hello again, I have 3 small questions this time.

-First, where could I set it so dialogue advances when I click the screen? I have the option to use that continue button, but it gets annoying to have to click it after every line, but if you can click anywhere I think it would be a lot better, but I can't find that option, if possible I would like to set it so a first click would show the full text box without waiting for it to finish showing, and once its fully shown, a click would move to the next line. And also I want to disable the automatic passing of the dialogue, so it only advances with clicking.

-second, there's any way I can access the variables of the dialogue manager from other scripts?, that would help me with quite a lot of things, but I can't open the script of the dialogue manager with visual studio.

-and third, I'm trying to make it so the "press space to interact" message disappears during dialogue because it sometimes gets in the way of the text box. I made a "talking" variable in the GameManager that gets set to true when characters are talking, and it works perfectly for stopping my character from moving while talking, as I made an "if" on the movement script to prevent it from working when "talking" is on. So I'm trying to use that same variable with the text showing "press space to interact" but I'm not finding exactly where to put it... help?

That's all, the game is starting to work really good, so thanks again for all the help!

Re: Newbie needing help!

Posted: Wed Jul 18, 2018 9:32 am
by Tony Li
Hi,
jeremycards wrote: Wed Jul 18, 2018 2:28 am-First, where could I set it so dialogue advances when I click the screen? I have the option to use that continue button, but it gets annoying to have to click it after every line, but if you can click anywhere I think it would be a lot better, but I can't find that option
Resize the continue button so it covers the entire screen. Set the Image component's Color alpha value to 0 so it's invisible. Delete the child Text element.
jeremycards wrote: Wed Jul 18, 2018 2:28 amif possible I would like to set it so a first click would show the full text box without waiting for it to finish showing, and once its fully shown, a click would move to the next line. And also I want to disable the automatic passing of the dialogue, so it only advances with clicking.
Inspect the Dialogue Manager. Set the Subtitle Settings > Continue Button dropdown to Always.

If your continue button(s) don't have a Standard UI Continue Button Fast Forward component, add one. Assign the subtitle's Text element to it. Then hook up the continue button's OnClick() event to call the component's OnFastForward method. This method checks the Text element. If it has a typewriter effect that's still typing, it will show the full text box. If the full text box is already fully shown, it will move to the next line.
jeremycards wrote: Wed Jul 18, 2018 2:28 am-second, there's any way I can access the variables of the dialogue manager from other scripts?, that would help me with quite a lot of things, but I can't open the script of the dialogue manager with visual studio.
Use the DialogueLua class. For example:

Code: Select all

using PixelCrushers.DialogueSystem;
...
if (DialogueLua.GetVariable("metBob").AsBool == true)
{
    Debug.Log("Player has met Bob.");
}
...
DialogueLua.SetVariable("currentTime", Time.time);
jeremycards wrote: Wed Jul 18, 2018 2:28 am-and third, I'm trying to make it so the "press space to interact" message disappears during dialogue because it sometimes gets in the way of the text box. I made a "talking" variable in the GameManager that gets set to true when characters are talking, and it works perfectly for stopping my character from moving while talking, as I made an "if" on the movement script to prevent it from working when "talking" is on. So I'm trying to use that same variable with the text showing "press space to interact" but I'm not finding exactly where to put it... help?
You may find it easier to use a Dialogue System Events component, as described in the Interaction Tutorial. (The tutorial also links to a video version if you prefer video tutorials.)

Add a Dialogue System Events component to the player. In the OnConversationStart() event, assign the Selector component, and configure it to set enabled false (i.e., the checkbox is unticked). In OnConversationEnd(), assign the Selector and configure it to set enabled true (ticked).

Re: Newbie needing help!

Posted: Wed Jul 18, 2018 10:39 pm
by jeremycards
Thank you! already fixed some things with this, will keep working on it!