Custom dialog options - options don't respond to click

Started by tor.brandt, Mon 14/11/2016 22:36:48

Previous topic - Next topic

tor.brandt

I'm trying to build a custom dialog options GUI.
For a start I have copy/pasted the script from the wiki (http://www.adventuregamestudio.co.uk/wiki/Custom_dialog_options_rendering) into my script, and it's rendering fine - but the dialog options don't respond to clicks.

I have a pretty long on_mouse_click funtion, so at first I thought it might be something in that that interferred with the clickability of the dialog options.
But I tried pasting the script into the default game template too, and the dialog options aren't clickable here either.

Would this be something I need to change/add in the dialog options script, or is it something I need to set somewhere in the AGS editor?

Khris

I pasted the example code into a new script in a default game. I had to replace every instance of "eFontFont0" with "eFontNormal", but after that it worked fine.
Could you show the dialog script you're using to test this?

tor.brandt

Quote from: Khris on Wed 16/11/2016 00:11:07
I pasted the example code into a new script in a default game. I had to replace every instance of "eFontFont0" with "eFontNormal", but after that it worked fine.
Could you show the dialog script you're using to test this?

Default game template.

Room script:
Code: ags
// room script file

function hHotspot1_Talk()
{
  dDialog0.Start();
}


Dialog script:
Code: ags
// Dialog script file
@S  // Dialog startup entry point
return

@1
return
@2
return
@3
return


Option text:
1. "First dialog option"
2. "Second dialog option"
3. "Third dialog option"

Couldn't really be anymore basic, right?
But, alas, nothing happens in-game when I click the dialog options.

EDIT: Oh, and I changed the font name too, and I put the example code into a new script.

Crimson Wizard

#3
If you are using AGS 3.4.0, the dialog options API changed there. To make the old one work you need to enable "Use old style custom dialog options API" option in Backwards compatibility section.

Details on how dialog options scripting works in 3.4.0 can be found here:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=52499.msg636523561#msg636523561

PS. Wiki pages are pretty much outdated, they correspond to version 3.1.2, which is almost eight years old now.

tor.brandt

Quote from: Crimson Wizard on Wed 16/11/2016 08:14:40
If you are using AGS 3.4.0, the dialog options API changed there. To make the old one work you need to enable "Use old style custom dialog options API" option in Backwards compatibility section.

Ahhh, I see, that explains it.
Thank you!

SMF spam blocked by CleanTalk