I want to make an enemy in my game act smart to improve gameplay. So how can I make enemy (called NPC in my project) patrol local area and chase a player when he is in a radius? And when player escapes, I want NPC to stop chasing him and return to patrolling.
.capx: https:// drive. google. com/open?id=0B3Iu4HpEXzMaNU1zYjlBNkdjUzg&authuser=0
Develop games in your browser. Powerful, performant & highly capable.
You could use the line of sight behaviour or check the distance between player and enemy and have the enemy react accordingly.