Tricky questions about possibilites of The Dialogue System

Announcements, support questions, and discussion for the Dialogue System.
User avatar
Hulda_Gnodima
Posts: 19
Joined: Fri Jan 17, 2020 9:04 am

Tricky questions about possibilites of The Dialogue System

Post by Hulda_Gnodima »

Hello Tony!

I'm coming to you with 6 very tricky questions about your Dialog System.
The reason I'm asking you is because I've now watched all your awesome Youtube-tutorials, and due to specific (and perhaps a little odd) ways I'm trying to make the dialog work in my project I'm not sure if it's possible using your system (despite it being so flexible and wonderful).

So below I'm detailing the functions I'm trying to achieve (with mock-up image setups), along with how I've thought about adding them using your system. My questions to you are: Are they possible to achieve using your system, and do you know how? I can add functions and code on my own, but I need to know which of your functions to utilize/modify/and in which scripts I can do so in. If that makes sense.

(Also please feel free to also ignore this forum-post if it's too much, I'm shamelessly asking so many questions! I will completely understand and have 0 hard feelings.)

Functions I'm trying to achieve/Questions:

1. Being able to use both regular PC conversation-lines and the PC Respond-menu
I'd like to be able to choose, for each Actor-dialog-text, if it's a Respond-menu text or just a regular text. Perhaps there's a setting/bool I tick but I haven't found it!
That is to say I want to be able to use both fluently throughout the project. Example:
Have both regular text PC speech:
And respond menu options:
In the same dialog/conversation. Is this possible with your system? I looked at the youtube-tutorials/documentaton and didn't see if there was info about it.

2. Having a specific progression on Responses and Subtitle-texts
This question ties in to the one above, as they're both about the respond-menu and subtitle-texts.
My idea of how I'd like responses to work and the dialog-interactions between characters is detailed below, it involves switching between PC subtitle texts and PC responses in succession. I've attached images of an example-dialog that shows this. My question is if it's possible with your system to have the respond-menu function as it's detailed below (together with the NPC subtitle text)?:
a.) An NPC asks a question for example
See:
b.) The Respond-menu fades in (an animation I've made)for the player's choices while the NPC's text is still visible.(Im not sure how to achieve this using your System, if there's a setting for it or I'd need to add code)
See:

c.) Player makes a choice by clicking Respond choice (like it normally works in your system).
d.) The respond-menu fades away (using animation I've made)
e.) The PC now responds according to that choice (The PC portrait/PC portrait name and PC subtitle text is shown). My idea was that the text shown here was one I've written (like normal using your Conversation editor).. It reflects the choice the player makes but needn't be identical to the choice-text in the Respond-menu. Is this possible?
See:
f.) NPC respons normally
See

Would this be possible in your system? To have the respons-menu fade in after an NPC asks a question, and the NPC text still being visible? And then to have the respond-menu fade after the choice one makes and the PC reply normally?
It may already be possible in the system, but I haven't found a way to do so yet! (checked youtube and tried to find it in the documentation)


3. Add emotes to text
I would like to be able to add commands like you already awesomely have (like [em1]text[/em1]), but for adding "emote"-images inbetween the text. So for instance [emote]#surprised[/emote]. I've attached an image to roughly how I would emotes to appear together with text in my project.
See:
See:

My thought was that I could instantiate a UI-image specifically after the text (where the command is located). It would also add blank text-space to make room for the emote. This UI-Image-element is then destroyed when the dialog-text advances and it isn't shown anymore.
To do that however I need to know where and how to create dialog text-commands. Would this be possible using your system? If you see a nice way to achieve emotes in text feel free to share!

4. Showing a "feelings"-box sometimes
I'd love to be able to (for a specific dialog-text) choose if a "feelings UI box" I've designed will be shown under the text.
So it would look a little like this:
See:
My aim is to add to your code, so that the dialog-editor has the following options:
See:

Do you know where I could add code to yours to achieve this in the editor/achieve effect? If you could just guide me to the correct script in The Dialog System that I could add it that would be awesome.

5. Choosing between different feelings displayed for Actor and Conversant in dialog-editor (via animation)
I have many animations for different feelings for my PC and NPCs. I'd like to be able to choose the emotion that the animator will display during that text using the editor in this manner:
See:
Happy example:
Sad Example:

So I'd like to add to your code, for these options to be available. is this possible, and if so, in which of your script do I add the code?

6. Making letter-sounds after each letter is written by the TypeWriter
I've written a function that makes specific letter-sounds depending on which letter it gets. I'd like to call this function each time the Typewriter writes out a letter in the dialog. Here's an image showing what I mean a little bit:
See:

I cannot find in your script where it happens (so I can add my function there). Can you direct me there? :)

Those are all of my questions!

I feel a little ashamed to ask you so many questions. My main aim is to know if it's feasible for me to add these functions to your system (to customize your system so that it fits my project) or if the best way to go about would be if I wrote my own from scratch.
I LOVE LOVE LOVE your asset however and would love to use it if it's possible for me to do so (and modify it to have the functions above). If you have any input for me, even if you don't reply to the questions above, I will be thrilled. Whatever your thoughts are (if you recommend I write a dialog system from scratch myself instead, or any input on the questions above) I truly appreciate it. I really respect you and your expertise in the field.

Thank you so much in advance!
User avatar
Tony Li
Posts: 22163
Joined: Thu Jul 18, 2013 1:27 pm

Re: Tricky questions about possibilites of The Dialogue System

Post by Tony Li »

Hi,

Yup, the Dialogue System can do all that. (Thanks for the detailed explanations and mockups, btw. They're very helpful.)
Hulda_Gnodima wrote: Tue Jan 21, 2020 5:19 am1. Being able to use both regular PC conversation-lines and the PC Respond-menu
Let's make this the default behavior:
  • When there is only one player response, show it automatically as a subtitle.
  • When there are two or more player responses, show a menu.
To set it up:
  • Inspect the Dialogue Manager GameObject. Untick Display Settings > Input Settings > Always Force Response Menu.
  • 2. Tick Subtitle Settings > Show PC Subtitles During Line.
  • 3. If you want to repeat the player's response menu choice as a subtitle, untick Skip PC Subtitle After Response Menu. Otherwise it will skip the subtitle since the text was already shown in the response menu. From your next question, I think you should untick this checkbox.
If you want a specific node to appear in a response menu even if it's the only currently-valid response, include the markup tag [f] in its text. The "[f]" tag is short for "force response menu". Similarly, if you want to always show a specific node as a subtitle and bypass the response menu even if more than one response is currently valid, include the tag [auto]. For more info about markup tags, jump to Markup Tags in the Dialogue Editor manual page.
Hulda_Gnodima wrote: Tue Jan 21, 2020 5:19 am2. Having a specific progression on Responses and Subtitle-texts
To keep the NPC subtitle visible while fading in the response menu, inspect the NPC subtitle panel's StandardUISubtitlePanel component. Change the Visibility dropdown to Until Superceded.
Hulda_Gnodima wrote: Tue Jan 21, 2020 5:19 amMy idea was that the text shown here was one I've written (like normal using your Conversation editor).. It reflects the choice the player makes but needn't be identical to the choice-text in the Respond-menu. Is this possible?
Put the response menu text in the Menu Text field. Put the subtitle text in the Dialogue Text field.
Hulda_Gnodima wrote: Tue Jan 21, 2020 5:19 am3. Add emotes to text
The easiest way is to use TextMesh Pro. First, use Window > Package Manager to import TextMesh Pro if it isn't already in your project. Then enable TextMesh Pro integration. (Jump down to "TextMesh Pro Support" on the Dialogue UIs manual page.) Switch your subtitle text UI elements from UI Text to TextMeshProUGUI. Finally, set up sprites for your emoji, and use the <sprite> tag in your Dialogue Text. (See: TextMesh Pro Sprites and Sprite Tag) Your Dialogue Text might look like:
  • Dialogue Text: I'm feeling a little sick. <sprite="dizzy">
Hulda_Gnodima wrote: Tue Jan 21, 2020 5:19 am...I need to know where and how to create dialog text-commands.
Side note on this: You can add a script to the Dialogue Manager that has an OnConversationLine method. In this method, you can change the subtitle content before it's displayed and/or do other processing. For example, you could have it handle custom codes in the text:

Code: Select all

using PixelCrushers.DialogueSystem;
...
void OnConversationLine(Subtitle subtitle)
{
    // If subtitle contains <my-cool-tag>, remove it and do something special:
    if (subtitle.formattedText.text.Contains("<my-cool-tag>"))
    {
        subtitle.formattedText.text = subtitle.formattedText.text.Replace("<my-cool-tag>", "");
        DoSomethingCool();
    }
}
Hulda_Gnodima wrote: Tue Jan 21, 2020 5:19 am4. Showing a "feelings"-box sometimes
You can use the OnConversationLine technique above, and put the feelings info in a custom dialogue entry field. Here's an example:

1. Add a custom field to the dialogue entry's All Fields section. Let's say it's called FeelingsText. A good way to do this is to go to the Templates tab. Expand the Dialogue Entry template. Click the "+" in the upper right of the template to add a new field. Title it "FeelingsText". Tick the "Main" checkbox so it will appear in the node's main editing area. Then select Menu > Apply Template To Assets to add the field to your existing dialogue entries.

2. Inspect any node for which you want a feelings box. You should see a new field named FeelingsText. Enter text and/or sprite tags.

3. Add a feelings box as a sub-panel in your subtitle panel. Add a TextMeshProUGUI to contain its text.

4. Add a script like this to the Dialogue Manager:

FeelingsTextHandler.cs

Code: Select all

using UnityEngine;
using PixelCrushers.DialogueSystem;
public class FeelingsTextHandler : MonoBehaviour
{
    public GameObject feelingsBox; //<--ASSIGN IN INSPECTOR.
    public TMPro.TextMeshProUGUI feelingsTextMesh; //<--ASSIGN IN INSPECTOR.
    
    void OnConversationLine(Subtitle subtitle)
    {
        string feelingsText = Field.LookupValue(subtitle.dialogueEntry.fields, "FeelingsText");
        feelingsBox.SetActive(!string.IsNullOrEmpty(feelingsText));
        feelingsTextMesh.text = feelingsText;
    }
}
This script checks if the current node has anything in its FeelingsText field. If so, it shows the feelings box and the text. If not, it hides the feelings box.

Another alternative is to use the SetActive() sequencer command to activate the feelings sub-panel GameObject, or write a custom sequencer command. But I think the script above is the most flexible.
Hulda_Gnodima wrote: Tue Jan 21, 2020 5:19 am5. Choosing between different feelings displayed for Actor and Conversant in dialog-editor (via animation)
If I understand correctly, you want to play animations on the character GameObjects themselves. If so, use the Sequence field. (See: Cutscene Sequences) There's a tutorial series on sequences. In this case, use the AnimatorPlay() or AnimatorPlayWait() commands. For example:
  • Dialogue Text: "Yay! Happy dance time!"
  • Sequence:

    Code: Select all

    AnimatorPlayWait(Dance)->Message(Done);
    AnimatorPlay(Idle)@Message(Done)
Hulda_Gnodima wrote: Tue Jan 21, 2020 5:19 am6. Making letter-sounds after each letter is written by the TypeWriter
This is set on the typewriter effect on the subtitle panel's Subtitle Text GameObject. If you switch to TextMesh Pro, you'll need to remove the UnityUITypewriterEffect and add a TextMeshProTypewriterEffect.

To play a random sound for each letter, assign them to the Alternate Audio Clips list.

To play a specific sound for each letter, make a subclass of UnityUITypewriterEffect (or TextMeshProTypewriterEffect if that's what you're using) and override the PlayCharacterAudio() method. Something like:

MyTypewriterEffect.cs

Code: Select all

using UnityEngine;
using PixelCrushers.DialogueSystem;
public class MyTypewriterEffect : TextMeshProTypewriterEffect
{
    protected override void PlayCharacterAudio()
    {
        char currentCharacter = current[current.Length-1];
        // <Here, call your function that plays audio specific to currentCharacter>
    }
}
I probably didn't cover everything you were wondering about in your post, so please feel free to ask any followup questions.
User avatar
Hulda_Gnodima
Posts: 19
Joined: Fri Jan 17, 2020 9:04 am

Re: Tricky questions about possibilites of The Dialogue System

Post by Hulda_Gnodima »

Tony you are a magician! I followed your steps and I managed to add almost everything on the list! You are simply fantastic, thank you a billion times for your expertise and time and effort to help.

There are a few things that I didn't manage to get flowing, I'm detailing them below with images.

1. The emotes work flawlessly! But now fastforward stopped
I added TextMeshPro-support per your instructions. However adding text-mesh pro made the "fastforward" continue-button not work. It just skips to the next text-dialog immediately when being pressed(I'm using the "E"-button). I thought perhaps it's because I should change the "Standard UI Continue Button Fast Forward"-script on each continue-button to one made for Text Mesh Pro. I looked in your documentation and found this:
https://www.pixelcrushers.com/dialogue_ ... rward.html
And I thought this must be it! But when I tried to find such a script to add I couldn't find one called that in The Dialog System. These are the hits I get when I searched for it:

I tried reimporting The Dialog System but still couldn't find it afterwards. I thought perhaps it's the Unity UI one instead, but when I switched everything to it it still didn't seem to work. Do you know what could remedy this fast forwarding not working? These are my current settings if it helps any:


2. Making the letters make specific sounds for each letter-script unfortunately didn't work.
Thank you for writing those scripts you gave me! The first one (that creates custom commands) works flawlessly and I'm SO excited to write and add my own functions that happen during dialog, thank you for this!

The last one that you so kindly provided however isn't compiling. It cannot find the variable "current", which I guess makes sense because it's not instantiated in the script. You can see the error it throws here when I tried to save your script:

I thought perhaps it was a variable in the TextMeshProTypewriterEffect-script we would have automatic access to, but I could not find the "current"-variable in that script either. I couldn't figure out how to extract information about which letter is being written via your TextMeshProTypewriterEffect-script. Do you know how I could access the information about which letter is being written in this moment, so I can use it to call my letterSpecificAudio-function?
If it helps any to see approximately what I'm gunning for, here's an early prototype I made with the letter specifc audio back when I'd made my own basic dialog:

Another strange thing occured btw with the script you provided. Even if I commented out all lines in the PlayCharacterAudio()-function (the one in the image above) and saved it, the editor still says there's something wrong with it. See here:


Strange yes?

Anyhow, thank you so so so much. Adding the animation is also causing a little trickery for me at the moment, but I thought I first want to make the fastforwarding work flawlessly, as well as the sound, and then I'll tackle it! I'm rewatching your tuts and checking documentation. I can't wait for everything to be in place, it's going to look AMAZING :)
User avatar
Tony Li
Posts: 22163
Joined: Thu Jul 18, 2013 1:27 pm

Re: Tricky questions about possibilites of The Dialogue System

Post by Tony Li »

Hi,
Hulda_Gnodima wrote: Wed Jan 22, 2020 2:47 pm1. The emotes work flawlessly! But now fastforward stopped
No need for that TextMeshProContinueButtonFastForward script. Inspect the continue button, and assign the TextMeshProTypewriterEffect to the StandardUIContinueButtonFastForward component's Typewriter Effect field.
Hulda_Gnodima wrote: Wed Jan 22, 2020 2:47 pm2. Making the letters make specific sounds for each letter-script unfortunately didn't work.
To add a script to a GameObject, Unity requires that the script filename and the class name must match exactly, including capitalization. Rename the script file to MyTypewriterEffect with a lowercase 'w' so it matches the class name.

Getting the current character is a little different for the TextMesh Pro typewriter effect. Try this script:

Code: Select all

using UnityEngine;
using PixelCrushers.DialogueSystem;

public class MyTypewriterEffect : TextMeshProTypewriterEffect
{
    private TMPro.TextMeshProUGUI tmp;

    public override void Awake()
    {
        base.Awake();
        tmp = GetComponent<TMPro.TextMeshProUGUI>();
    }
    
    protected override void PlayCharacterAudio()
    {
        //---WAS (incorrect): var c = tmp.text[tmp.maxVisibleCharacters];
        var c = tmp.GetParsedText()[tmp.maxVisibleCharacters];
        
        // Your code here to play the audio for character c.
    }
}
User avatar
Hulda_Gnodima
Posts: 19
Joined: Fri Jan 17, 2020 9:04 am

Re: Tricky questions about possibilites of The Dialogue System

Post by Hulda_Gnodima »

Fantastic Tony, thank you for your help :) your replies fixed both the problems! Every time I've seen your replies I've felt grateful and glad!

I come to you with a little bug in the script you so kindly provided in your message.
Some of the tags seem to be causing errors in which letters are being received (via your script) by my letter-audio-function. See example here:


I've attached a video so you can see it in action. I've slowed down the speech so you can see that the letters match exactly until the specific tag comes here:

You can open the video in full quality (if it's not showing in good quality in the forum-post) here:https://streamable.com/s28ro
(To see the wrong letters being sent in to my function, see 00:28 specifically. It's when "Vulpion" is being said)

It seems to me that the letters my script is receiving are textformat-instructions on how the text should look, rather than the text? Afterwards all letters are also wrong, like a waterfall-effect.

Do you know what I can do to fix this bug, so that the letters I receive will always be those that are written out into the text-window?

Thank you in advance!
User avatar
Tony Li
Posts: 22163
Joined: Thu Jul 18, 2013 1:27 pm

Re: Tricky questions about possibilites of The Dialogue System

Post by Tony Li »

Hi,

Good catch. I forgot about codes. Change this line:

Code: Select all

var c = tmp.text[tmp.maxVisibleCharacters];
to this:

Code: Select all

var c = tmp.GetParsedText()[tmp.maxVisibleCharacters];
User avatar
Hulda_Gnodima
Posts: 19
Joined: Fri Jan 17, 2020 9:04 am

Re: Tricky questions about possibilites of The Dialogue System

Post by Hulda_Gnodima »

I just wanted to say thank you! Your fix worked perfectly! :D
User avatar
Tony Li
Posts: 22163
Joined: Thu Jul 18, 2013 1:27 pm

Re: Tricky questions about possibilites of The Dialogue System

Post by Tony Li »

Whew! ;-) Glad to help.
User avatar
Hulda_Gnodima
Posts: 19
Joined: Fri Jan 17, 2020 9:04 am

Re: Tricky questions about possibilites of The Dialogue System

Post by Hulda_Gnodima »

Hello again Tony!

Now thing's are running smoothly with audio, and most of the functionality, I-am-stoked! Honestly it looks so fantastic and works so well I could scream :) your asset has become so precious to me!

There are just a couple of things I still haven't been able to set up (and some things aren't behaving the way I'm trying to make them do haha). Below I'm detailing these particular areas, hoping you can help me weed them out. Again please feel no pressure to reply, no hard feelings at ALL! You've already been so helpful.

1. Having trouble figuring out how to make my character's animation's show properly
I made two temporary animations. The animation-parts are held in the UI under an empty gameobject I've called "HoldAllParts". The animations have two current states(but more will came): talking, not talking;
The animations are dependent on an animator on the "HoldAllParts"-gameobject. This is how it looks:

hot-link if quality in inbedded video isn't good: https://streamable.com/x99ue
(see 00:00-00:43 to see how it's set up in my project)
(see 00:43-00:56 to see how it's animated)
(see 01:15-01:24 to see how animations are behaving in game.)
(see 01:24 to see the error-messaged "Parameter "Show"/"Hide" does not exist")

As you can see since I haven't set it up properly it's not behaving as it should(the portraits aren't toggling on/off correctly with their dialog, I'm getting error messages "Parameter "Show"/"Hide" does not exist, only default talk-animation is playing etc).
I've googled and looked at your vids but can't seem to figure out how to set it up properly. I've tried ticking the "Use animated portraits" and calling animations through the dialog as your Sequence-video showed ("Animation(Idle)" for example), but I just can't seem to figure out how to set it up properly so I don't get error messages/it calls the right animator/calls animations. Where to drag/attach my animator etc? Is there a step by step guide on how to do this, or could you direct me how I could do? Thanks so much in advance, this one is the trickiest for me!

2. Recieve information in my own script about who is talking?
I wish to, during a conversation, access info about who is speaking at that very moment from an external script ( I've written). The reason I want to do this is because I wish to access specific NPC-attributes I've attributed to each Actor (voice-pitch, voice, sprites needed for the animator etc). My idea on how to achieve this was if I could add a gameobject-prefab field to each "Actor" in the Actor-page in the editor, like so:
Image

That way if I could access the actor, I could therefore find its associated prefab (to which I could attach all kinds of information and functions to call). However, for this to work I'd have to be able to access which actor is currently speaking as well, which I don't know how to do. If you could direct me on how modify your script to add a prefab-field and how to access current actor speaking, I would be super grateful. Or if you know of other ways to get actor-info that are even better please share!

3. [var?=variableName] not prompting a input text-field.
I want the player to add a custom variable in the response-text, but I think I don't quite understand how to set it up because a text-promp isn't appearing despite using the [var=?customVariable] call in text. I looked at the documentation, but couldn't quite figure out how to set it up. This is what's currently happening:

Direct link to video if embedded quality isn't good :):https://streamable.com/umhu2
(See 00:00-00:11 for my Dialog UI general setup to the left,
00:11-00:18 to see how I set up my variable in the "Variables"-editor,
00:18-00:30 to see how I'm calling it in the Dialog Entry,
00:38-00:55 to see how it's behaving in my dialog in game)

Do you know what is wrong and how I could alleviate this? I wish to save this custom player-variable so I can use it in the future (to for example have NPC's referencing player's birthplace etc) :)

4. Access ones Dialog System variables via code
This one relates a little to the same as question above, Dialog System Variables. I want the player to be able to set their own name/their sex/birthplace etc, and plan on making these player variables to affect dialog (he/she to depending on the sex chosen, birthplace affecting NPC-responses etc.). How can I both set the variables (via code) in the "Variables"-page in the Editor, and how can I access variables there and their values via my own scripts? Thanks!

5. FPS-drop first time initiating dialog in game, is this fixable?
This one's a little bit mysterious to me. Your dialog-system runs so smoothly without affecting fps after I've opened it once when the game is running, but the first time always causes a "hiccup" in fps (that freezes the game a little, making it noticeable). This is how it looks in game:

Hotlink if inbedded-quality is poor: https://streamable.com/xv2ds
(see 00:11-00:13 to see the "freeze" and the fps drop, then 00:20-00:22 to see the second conversation-start and see no freeze or fps-drop)

It seems two Dialog System scripts are contributing to this (see image below)
Image

Could I somehow fix this by tweaking your script? I had something similar happen to my own scripts and fixed it by moving some method-calls/variable-instantiations in my scripts between the "Start" and "Awake" functions (so that they did tasks right away, not waiting for the gameobject holding the script to be turned on -> this way they just became part of the initial loading time kind off?).
Could I do something similar for your Dialog System, meaning make sure these scripts run as soon as the game is started, so there's no noticable "hiccup" when the dialog system is first used? Appreciate hearing your thoughts!


6. Feelings-box animation+feelings-text displaying only after primary dialog-text finished?
You helped me awesomely with the feelings-text, and it's appearing wonderfully! I tried it out, and I think it will look even better if it fades it/starts writing its text-content after the dialog-text above is finished. This is how it looks now:

https://streamable.com/7k2ik
(see 00:14-00:19 to see feelings-box appear simultaneously with text above)

So to summarize I'd love for it to appear only after the first main dialog-text above is done. If the player clicks to advance the conversation before it's done however, I want the main text + feelingsbox+feelingsbox-text to appear all at once immediately.
Would these things be possible to achieve? Or would it be too difficult?

That's all. Whatever thoughts you wish to share I'll be happy to hear! Again feel free to ignore all my questions, they are so many! I'm already very happy with your asset and have received help from you above and beyond! :) It feels like I'm very close to having it perfect! Thank you a quintillion for what you have already helped with. You are a superstar!
User avatar
Tony Li
Posts: 22163
Joined: Thu Jul 18, 2013 1:27 pm

Re: Tricky questions about possibilites of The Dialogue System

Post by Tony Li »

Hi,
Hulda_Gnodima wrote: Sat Feb 01, 2020 5:55 pm1. Having trouble figuring out how to make my character's animation's show properly
The tail part of the Dialogue UI video tutorial covers how to set up animation using a Dialogue Actor components on the characters, and an Animator component on the Portrait Image GameObject. It's not the most detailed tutorial, but give it a look to see if it will work for you. The tutorial assumes spritesheet animation, but you can do the same with any type of animation.
Hulda_Gnodima wrote: Sat Feb 01, 2020 5:55 pm2. Recieve information in my own script about who is talking?
Two ways:

In your script, check DialogueManager.currentConversationState.

And/or add an OnConversationLine method. This method is called just before a subtitle is shown. You can check its Subtitle object.

Code: Select all

void OnConversationLine(Subtitle subtitle)
{
     Debug.Log(subtitle.speakerInfo.Name + " says: " + subtitle.formattedText.text);
}
Hulda_Gnodima wrote: Sat Feb 01, 2020 5:55 pm3. [var?=variableName] not prompting a input text-field.
Make sure your dialogue UI has a Text Field UI. (Take a look at the Basic Standard Dialogue UI for an example.)

An alternative form to [var?=variableName] is to use the TextInput() sequencer command. They do the same thing, but it might be easier to get working.
Hulda_Gnodima wrote: Sat Feb 01, 2020 5:55 pm4. Access ones Dialog System variables via code
Use DialogueLua.SetVariable -- or DialogueLua.SetActorField if you want to set an actor field instead of a variable:

Code: Select all

DialogueLua.SetVariable("DoorsOpened", 3);
DialogueLua.SetActorField("Player", "Display Name", "Sir Fluffy");
Hulda_Gnodima wrote: Sat Feb 01, 2020 5:55 pm5. FPS-drop first time initiating dialog in game, is this fixable?
Yes. It will be fixed in the next release (mid-February). In the meantime, you can use the tip at the bottom of this post if you want.
Hulda_Gnodima wrote: Sat Feb 01, 2020 5:55 pm6. Feelings-box animation+feelings-text displaying only after primary dialog-text finished?
Set up the box in OnConversationLine like you do now, but don't activate the box yet. Add a separate method to activate the box if it has text. Configure the typewriter effect's OnEnd() UnityEvent to call this method.
Post Reply