12-13-2009, 08:57 AM
Also if you want to make it more realistic, you could say (if (both (player is within 20 meters of enemy) and (player's distance in front of enemy is >= -2) then (enemy turn to face player) else (Do Nothing))
In this way you could make it a stealthy approach, and if you are behind the enemy, but more than 2 meters behind him, he will not notice you. Then if you are too close to behind him, he will turn around anyway and do whatever method you choose to initialize then (shoot, melee, etc.)
Check out my best projects so far and please comment:
Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
|