Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Sat 21/02/2004 11:17:26

Title: In dialog room change or event
Post by: on Sat 21/02/2004 11:17:26
I want to have my charictor see a mesage from another charictor and have a choice of things to reply, and if he guesses the right one i want him to go into a room, or get an Item.  Is this possible? :-\
Title: Re:In dialog room change or event
Post by: Wolfgang Abenteuer on Sat 21/02/2004 17:54:14
Sure.  You just have to use run-script x under the correct dialogue option, and then script something under that value (whatever number you chose "x" to be) in the function dialog_request in the global script.  The dialog_request function is scripted just like everything else, so you can do anything you want to within a dialogue, including changing rooms.

For simply adding an inventory item, though, you don't even need to go through all that hassle.  Just use add-inv x ("x" being the item number) within the dialogue script.

~Wolfgang