Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: iamlowlikeyou on Wed 03/11/2010 23:56:54

Title: How do I get player to walk to another character before dialog start? [SOLVED]
Post by: iamlowlikeyou on Wed 03/11/2010 23:56:54
I'm using this code:

function Girl_Talk()
{
 player.Walk(160, 100);
 dDialog1.Start();
}


If the the dDialog1.Start command is enabled, the dialog starts before player has walked to the Girl character.
But if I comment out the dDialog.Start command, player walks to the Girl.
It seems that the dDialog1.Start command somehow overrides the player.Walk command?

Thanks for your help!
Title: Re: How do I get player to walk to another character before dialog start?
Post by: monkey0506 on Thu 04/11/2010 00:48:04
By default Character.Walk is non-blocking. Pass the BlockingStyle parameter as eBlock to get what you're wanting. I forget the order of the parameters, so just look it up in the manual.
Title: Re: How do I get player to walk to another character before dialog start?
Post by: Matti on Thu 04/11/2010 00:48:52
The walk command must be a blocking one:

player.Walk(160, 100, eBlock);


Edit: Yeah, what monkey said.
Title: Re: How do I get player to walk to another character before dialog start?
Post by: iamlowlikeyou on Thu 04/11/2010 00:54:28
Oh right, now it works! Thanks a lot! ;D