Hi
I'm trying to implement something that gives additional context to a dialogue option, when the mouse hovers over it (using a tooltip.)
At this point, I have percentage checks working, like in fallout:
But I don't want the [speech 25] in the text. I want it on another part of the gui. Like in Disco Elysium:
My problem is that I need to tell the tooltip stuff about the dialogue option before the player chooses it. So far I've managed to send the Menu text to the tooltip by way of the UI Response Button's text component.
Is there a way to get "invisible" information out of the dialogue option before the player clicks on it? (something like, "this option needs 25 speech.")?
Thanks.
Is there a way to hide data in dialogue options?
-
- Posts: 40
- Joined: Mon May 24, 2021 7:22 pm
-
- Posts: 40
- Joined: Mon May 24, 2021 7:22 pm
Re: Is there a way to hide data in dialogue options?
Thanks. That was very helpful.
I have it running now.
One question though, The example uses a custom field named "Activate on Hover" to activate an object, by name. Is there a way to set that field in code? Right now I'm manually typing the name of the object I want to show, and it works fine. But I can see that generating problems as the project grows.
I have it running now.
One question though, The example uses a custom field named "Activate on Hover" to activate an object, by name. Is there a way to set that field in code? Right now I'm manually typing the name of the object I want to show, and it works fine. But I can see that generating problems as the project grows.
Re: Is there a way to hide data in dialogue options?
Hi,
If you're doing something like Disco Elysium, you could always just put all the content in the Description field. If you're using TextMesh Pro, you can include <sprite> tags in the Description text.
You can also set a field in code:
If you're doing something like Disco Elysium, you could always just put all the content in the Description field. If you're using TextMesh Pro, you can include <sprite> tags in the Description text.
You can also set a field in code:
Code: Select all
// Works at runtime:
Conversation conversation = DialogueManager.masterDatabase.GetConversation("Some Conversation");
DialogueEntry entry = conversation.GetDialogueEntry("Entry Title");
Field.SetValue(entry.fields, "Activate on Hover", SomeGameObject.name);