Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Andrea1992 on Sun 01/11/2020 04:27:08

Title: hover sound for dialogue options
Post by: Andrea1992 on Sun 01/11/2020 04:27:08
Hi, I'm using a Lucasarts speech style. I'd like to add a sound when the player hovers over the dialogue options. Is this possible?
Thanks!
Title: Re: hover sound for dialogue options
Post by: Olleh19 on Mon 02/11/2020 19:42:51
Quote from: Andrea1992 on Sun 01/11/2020 04:27:08
Hi, I'm using a Lucasarts speech style. I'd like to add a sound when the player hovers over the dialogue options. Is this possible?
Thanks!

Hi, always use the Autofill function in script and look there.

If you type Dialog in a script you'll get a lot of different suggested options, then click on one of those and push F1, then the manual opens that section.
Hope you'll find what you're looking for. As for if it's possible. I don't know, i'm pretty new to AGS aswell, but using autofill function and F1 is your second best friend. Best friend (usually) is this forum if you'll get a reply.
I hope some of the more accomplished users can shine in here and help you out!

Title: Re: hover sound for dialogue options
Post by: Crimson Wizard on Mon 02/11/2020 19:46:33
Andrea1992, look into Custom dialog option rendering in your manual: https://adventuregamestudio.github.io/ags-manual/CustomDialogOptions.html
Thw downside is that you will have to also script drawing option text yourself, but you may copy standard code, and on upside that will let you customize anything if needed.

There are code examples illustrating how to detect which option is under cursor.
Use "dialog_options_repexec", but use a variable to remember last option that cursor was on, and test if it has changed or not, to avoid starting same sound endlessly.
Title: Re: hover sound for dialogue options
Post by: Khris on Tue 03/11/2020 11:09:44
Also consider adding an option to your in-game settings to turn off the sound...  ;)
Title: Re: hover sound for dialogue options
Post by: Andrea1992 on Wed 04/11/2020 10:01:18
Crimson Wizard Thanks a lot!