Hi,
Yes, but it requires a little scripting. I'll describe one possible approach using Unity UI. If you're using a different GUI system, you can adapt the same idea.
In your dialogue database, add a custom field titled something like "Hover Sequence" to your response dialogue entry notes. Set it to a sequence such as "Audio(someThoughtsAudioClip)" where someThoughtsAudioClip is the name of an audio clip in a Resources folder.
Create a script with a method such as "PlayHoverSequence" and add it to your response buttons (or your response button template if you're using that style).
Code: Select all
public class HoverButton : MonoBehaviour {
public void PlayHoverSequence() {
// Get the response associated with the button:
var response = GetComponent<UnityUIResponseButton>().response;
// Set the response's Hover Sequence:
var sequence = Field.LookupValue(responseButton.dialogueEntry.fields, "Hover Sequence");
// Play the Hover Sequence:
DialogueManager.PlaySequence(sequence);
}
}
Add an Event Trigger component to the response button. Add a Pointer Enter event, and assign the PlayHoverSequence method.
How this works:
1. When the player hovers over the button, the Event Trigger > Pointer Enter event calls the PlayHoverSequence method.
2. The PlayHoverSequence method looks up the response associated with the button and plays its Hover Sequence.