Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: lilinuyasha on Mon 27/12/2010 06:56:56

Title: multiple characters walking at once?
Post by: lilinuyasha on Mon 27/12/2010 06:56:56
how would i make multiple onscreen characters walk to a specific location at once? is this possible?
Title: Re: multiple characters walking at once?
Post by: Khris on Mon 27/12/2010 11:55:14
Yes, sure, just make them walk non-blocking.

You're very quick to post here, maybe give it some time trying to figure it out yourself next time?
Title: Re: multiple characters walking at once?
Post by: lilinuyasha on Mon 27/12/2010 23:26:09
so i make all of them walk eNoBlock?
Title: Re: multiple characters walking at once?
Post by: Khris on Mon 27/12/2010 23:33:20
Say you want three characters to cross the screen at the same time but blocking, i.e. the script continues after they all moved:

  cGuy1.Walk(300, 170);
  cGuy2.Walk(300, 180);
  cGuy3.Walk(300, 190, eBlock);


This sends off the first two in the background, then cGuy3 blocking, i.e. halts the script execution until cGuy3 reached his destination. Thus the character who'll take the longest is supposed to go last and blocking.

As you can see, the solution is pretty straightforward and simple. You could have figured that out on your own. These forums are literally the last resort when it comes to script problems, please try some stuff before opening a thread.