Access dynamic tooltip data for responses

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
BoringSuburbanDad
Posts: 1
Joined: Mon Nov 04, 2024 3:31 pm

Access dynamic tooltip data for responses

Post by BoringSuburbanDad »

Hi there and thank you so much for creating DS, which is so much fun to use!

I can't get my head around the following problem:
I'm building a system where responses from the player can have several consequences, such as Variable A increases by an offset while Variable B decreases by a different offset. These variables can be different for every response.
It's no problem to calculate the outcome when the response is clicked, but I want to show the possible outcome of the responses in a tooltip and several TMP before the player clicks on the response. I already added the "Activate on Response Hover" script and it works as it should, but I don't know how to change these offset variables based on the response that is hovered.

Hope this is understandable.
User avatar
Tony Li
Posts: 22034
Joined: Thu Jul 18, 2013 1:27 pm

Re: Access dynamic tooltip data for responses

Post by Tony Li »

Hi,

Since you're using TextMesh Pro, modify the ActivateOnHover script or create your own script that works similarly. Change the tooltip variable's type to TextMeshProUGUI. You can get rid of the activateOnHover GameObject. The script will show the dynamic tooltip text in the tooltip variable.

Then put the tooltip data in the response dialogue entry's Description field.
Post Reply