Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: picklegreen on Thu 08/09/2011 10:45:49

Title: collsison problem
Post by: picklegreen on Thu 08/09/2011 10:45:49
I have a character that walks between 3 different spots (using a timer) when my main character talks to the alking character he stops walking, my character walks to him, they face each other and talk. The only problem is the main character stands right behind the other character, so I can't see him.
Is there a way to keep a set distace between them with making them both walk to a particular spot?
Title: Re: collsison problem
Post by: hedgefield on Thu 08/09/2011 13:12:37
Instead of passing a set of world coordinates, try using the current coordinates of the walking character.

So instead of:

player.Walk(160, 160, eBlock);

try:

player.Walk(cWalkingDude.x+80, cWalkingDude.y, eBlock);

+80 will put the player 80 pixels to the right of WalkingDude.
Title: Re: collsison problem
Post by: picklegreen on Fri 09/09/2011 11:41:02
Great, thanks!