Following another charactor
Posted: Thu Apr 20, 2006 4:09 am
How do you make an enemy on a path follow a charector when it comes into view and as soon as the enemy leave charectors view continue its path??
Game Editor discussion board
http://game-editor.com/forum/
if (distance(x, y, Character.x, Character.y) < [value for distance])
{
angle = direction(x, y, Character.x, Character.y);
directional_velocity = [enter a value here];
}
else
{
directional_velocity = 0;
}