Page 1 of 2

Hint shown when hovering

Posted: Wed Jul 12, 2023 11:17 am
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!

Re: Hint shown when hovering

Posted: Wed Jul 12, 2023 12:14 pm
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.

Re: Hint shown when hovering

Posted: Wed Jul 12, 2023 10:16 pm
by GREI
I think now the images should be showing.
Template.png
Template.png (30.06 KiB) Viewed 565 times
Inspector.png
Inspector.png (139.91 KiB) Viewed 565 times
Code.png
Code.png (63.84 KiB) Viewed 565 times
And I have looked through the example scene, it looks like I have the same setup.

Re: Hint shown when hovering

Posted: Wed Jul 12, 2023 11:12 pm
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?

Re: Hint shown when hovering

Posted: Thu Jul 13, 2023 10:53 am
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?

Re: Hint shown when hovering

Posted: Thu Jul 13, 2023 10:54 am
by GREI
the example scene works properly though

Re: Hint shown when hovering

Posted: Thu Jul 13, 2023 3:58 pm
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 549 times

Re: Hint shown when hovering

Posted: Thu Jul 13, 2023 10:43 pm
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 546 times
Here is the error message.
Error Message.png
Error Message.png (78.05 KiB) Viewed 546 times

Re: Hint shown when hovering

Posted: Thu Jul 13, 2023 11:15 pm
by Tony Li
Hi,

What version of the Dialogue System are you using?

Is "NoticedFamiliarityWith27" a Boolean variable or a Text variable?

Re: Hint shown when hovering

Posted: Fri Jul 14, 2023 12:01 am
by GREI
the version is 2.2.32 and "NoticedFamiliarityWith27" is a Boolean