Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: phillipPbor on Fri 13/05/2016 03:13:46

Title: move while dialog
Post by: phillipPbor on Fri 13/05/2016 03:13:46
is there a code for moving the character while dialog?
I mean, after you end talking the character goes back to his room?:undecided:
Title: Re: move while dialog
Post by: Mandle on Fri 13/05/2016 12:20:48
I don't think you can command characters to move from within dialog (I could easily be wrong though)...

But, in case I'm right, what I would do is:

Set a bool at the end of the dialog: RogerDialogOver=true or whatever...

Have AGS repeatedly check if RogerDialogOver==true...

If it is true then run the character reentering house sequence, at the end of which set the bool back to false (if repeated appearences are necessary)...
Title: Re: move while dialog
Post by: Khris on Fri 13/05/2016 13:06:18
You can call regular script commands in dialogs at any point (just indent them by at least one space), but player.ChangeRoom() will get queued, not executed immediately.
To run code right after a dialog, check this recent post: http://www.adventuregamestudio.co.uk/forums/index.php?topic=53456.msg636534107#msg636534107