A little more AI :)
![Post Post](styles/prosilver/imageset/icon_post_target.gif)
Ok guyes... don't worry, i no how to make the enemy move to my player,
My problem is that if my enemy is above the player when he starts, he will seem to float.
I put this code in draw actor of enemy...
if(distance(x, y, player.x, player.y) < 160)
{
angle = direction(x, y, player.x, player.y);
directional_velocity = 2;
}
Sooo, now he goes to my player... but since (in my game) the enemy starts above the player, the enemy seems to float down to the player.
I want the enemy to walk only on the x axis, but not the y.
Any help is appreciated
Oman
p.s. if u havent already guessed, my game is a platformer.![Smile :)](http://game-editor.com/forum/images/smilies/icon_smile.gif)
My problem is that if my enemy is above the player when he starts, he will seem to float.
I put this code in draw actor of enemy...
if(distance(x, y, player.x, player.y) < 160)
{
angle = direction(x, y, player.x, player.y);
directional_velocity = 2;
}
Sooo, now he goes to my player... but since (in my game) the enemy starts above the player, the enemy seems to float down to the player.
I want the enemy to walk only on the x axis, but not the y.
Any help is appreciated
![Smile :)](http://game-editor.com/forum/images/smilies/icon_smile.gif)
Oman
p.s. if u havent already guessed, my game is a platformer.
![Smile :)](http://game-editor.com/forum/images/smilies/icon_smile.gif)