Hint shown when hovering

Announcements, support questions, and discussion for the Dialogue System.
GREI
Posts: 20
Joined: Fri Oct 14, 2022 2:38 pm

Hint shown when hovering

Post by GREI »

Hi,
I have followed the solution in the linked post to try to achieve showing hints when hovering the response text.
https://www.pixelcrushers.com/phpbb/vie ... a382615bb1

But so far the hint is not showing. Below is my own implementation.
Template.png
Inspector.png
Code.png
Any help is much appreciated!
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: Hint shown when hovering

Post by Tony Li »

Hi,

I'm afraid your images didn't come through in your post.

The Dialogue System Extras page has a Hover Example (direct download) that may be helpful.
GREI
Posts: 20
Joined: Fri Oct 14, 2022 2:38 pm

Re: Hint shown when hovering

Post by GREI »

I think now the images should be showing.
Template.png
Template.png (30.06 KiB) Viewed 608 times
Inspector.png
Inspector.png (139.91 KiB) Viewed 608 times
Code.png
Code.png (63.84 KiB) Viewed 608 times
And I have looked through the example scene, it looks like I have the same setup.
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: Hint shown when hovering

Post by Tony Li »

Hi,

Does the included example scene work correctly? (Hover Response Button Example)

If so, can you identify what you might be doing differently? Did you modify the ActivateOnResponseHover script, other than changing "Description" to "Hint"?

Try adding a Debug.Log() line at the end of your OnHover method, something like:

Code: Select all

Debug.Log("HINT: " + Field.LookupValue(response.destinationEntry.fields, "Description"));
If you inspect the Tooltip Text GameObject after hovering a response button, does it have the hint text?

Are there any errors or warnings in the Console window?
GREI
Posts: 20
Joined: Fri Oct 14, 2022 2:38 pm

Re: Hint shown when hovering

Post by GREI »

No, the console does not say anything and the text in the tooltip text does not change. (i.e. it is always empty)
the code was not change except for the "hint" line of code.
Does ActivationOnResponseHover depend on any pre-requisites?
Last edited by GREI on Thu Jul 13, 2023 10:55 am, edited 1 time in total.
GREI
Posts: 20
Joined: Fri Oct 14, 2022 2:38 pm

Re: Hint shown when hovering

Post by GREI »

the example scene works properly though
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: Hint shown when hovering

Post by Tony Li »

Hi,

Did you set up the Event Trigger component like on the example's response button template?

activateOnHoverEventTrigger.png
activateOnHoverEventTrigger.png (83.15 KiB) Viewed 592 times
GREI
Posts: 20
Joined: Fri Oct 14, 2022 2:38 pm

Re: Hint shown when hovering

Post by GREI »

That is what I missed! It works now, thank you!
But I am having trouble parsing Lua code.
Here is the Lua code
Lua Code.png
Lua Code.png (4.68 KiB) Viewed 589 times
Here is the error message.
Error Message.png
Error Message.png (78.05 KiB) Viewed 589 times
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: Hint shown when hovering

Post by Tony Li »

Hi,

What version of the Dialogue System are you using?

Is "NoticedFamiliarityWith27" a Boolean variable or a Text variable?
GREI
Posts: 20
Joined: Fri Oct 14, 2022 2:38 pm

Re: Hint shown when hovering

Post by GREI »

the version is 2.2.32 and "NoticedFamiliarityWith27" is a Boolean
Post Reply