Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Hans on Wed 17/01/2007 14:50:08

Title: Still a problem with dialogs (SOLVED)
Post by: Hans on Wed 17/01/2007 14:50:08
My last topic was locked. But I'm still wondering why my dialog script doesn't work!

The code is:

@S  // dialog startup entry point
@1  // option 1
Ego: Nope...
option-off 1
option-on 2
stop
@2  // option 2
Ego: I don't think so.
option-off 2
option-on 1
stop

Why doesn't it start option 2 the second time?
Title: Re: Still a problem with dialogs.
Post by: Ashen on Wed 17/01/2007 15:01:16
Try putting 'return' after the @S. I think it's running the first bit of available code when you start the dialog again, even though option 1 is technically turned off.

However, if this is all you've using the dialog for, why not just use variables and script it? (Or even use SSH's MultiResponse module (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=27947.0).)

I locked the original topic because the question you asked was covered in the manual. This is a different question, so I'll leave them as seperate threads.
Title: Re: Still a problem with dialogs.
Post by: Hans on Wed 17/01/2007 15:06:14
That's it!  :D
That's exactly it!

**--__--** ((TOPIC LOVED)) **--__--**
Title: Re: Still a problem with dialogs (SOLVED)
Post by: Khris on Wed 17/01/2007 18:34:46
Just for future reference:
The script doesn't care if an option is on or off; "@1", "@2" aso., just like "@S", are just entry points, i.e. the script will run from those points until it encounters return or stop, regardless whether the options of the encountered @X-lines are on or off.

Turning options on or off will only affect whether they are displayed on the GUI or not.

So, like Ashen said, it's usually necessary to put a return before "@1".