Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: ZapZap on Wed 08/12/2010 15:24:22

Title: Running dialog before character moves (SOLVED)
Post by: ZapZap on Wed 08/12/2010 15:24:22
Hi everyone, i'm new so sorry if my questions seem stupid.
I want this: when the main char walks over a hotspot, a dialog is triggered and after it ends the character moves again. When i try to do so, the character moves first and then the dialog is on. how do i make it happen in the right order?
Thanks for your attention
Title: Re: Running dialog before character moves
Post by: Khris on Wed 08/12/2010 15:30:01
The reason it doesn't run in the right order is that Dialog.Start() is queued until the current function has finished.

Put the player.Move() command in the dialog script instead, right before stop. Don't forget to indent the line so AGS recognizes it as standard script command.
Title: Re: Running dialog before character moves
Post by: ZapZap on Wed 08/12/2010 15:54:05
Thank you thank you thank you. Next time i'll search more thoroughly the manual. By the way.. do I have to change the name of this post adding (SOLVED) or moderators do that?
Title: Re: Running dialog before character moves
Post by: Khris on Wed 08/12/2010 17:35:14
You don't have to, but since you can do it and you can judge best whether this is actually solved, why don't you go ahead and edit the title yourself?
Just modify the first post using the link and change the subject.