Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Meatballs on Thu 04/08/2011 14:54:01

Title: How to make my characters talk to objects.
Post by: Meatballs on Thu 04/08/2011 14:54:01
Okay so I've written a dialog file (ddialog1) now what do I type in the scrpit window to make ddialog1 appear whenever my character uses the talk to command? ???
Title: Re: How to make my characters talk to objects.
Post by: Khris on Thu 04/08/2011 15:27:50
You select whatever the player character talks to (an NPC, an intercom, what have you), then click the lighting bolt icon at the top of the properties pane.
Then you click on the "talk to" event, then on the ellipses (...) button in the empty field next to it.
AGS will now create and link to the function.
Inside the function, between { and }, you put:

  ddialog1.Start();

The next thing you do though is read the manual and do the tutorial. Also read the forum rules thread and check out the resources in there.

You aren't supposed to ask a question like this in the forums; the manual's tutorial clearly explains how to do this.
Title: Re: How to make my characters talk to objects.
Post by: Meatballs on Thu 04/08/2011 15:30:20
I tried hat and got room1.asc(68): Error (line 68): Undefined token 'ddialog1'
Title: Re: How to make my characters talk to objects.
Post by: Khris on Thu 04/08/2011 15:33:34
Please post the surrounding lines.

Are you sure the dialog is called "ddialog1"?

If you type the first three letters of a command or object, the auto-complete window will kick in. If it's not in there, you're spelling it wrong.
Title: Re: How to make my characters talk to objects.
Post by: Meatballs on Thu 04/08/2011 15:43:42
function Skull_Talk()
{
ddialog1.Start();
}
NVM fixed. Thanks :)