playMaker

Author Topic: Enemy Finding the player and follow him  (Read 2259 times)

Eduardo

  • Playmaker Newbie
  • *
  • Posts: 11
Enemy Finding the player and follow him
« on: May 02, 2018, 01:25:07 PM »
Hello, is there any tutorial on how the enemy can find the player in order to attack him as an example.

But I'm using my keyboard 3rd person character but, so not using my mouse I know sometimes the click on the mouse help the enemy to find my location, but IF I'm not using the mouse , HOW THE ENEMY CAN FIND MY LOCATION AND FOLLOW ME where ever I might be ?

Thanks for your help

terri

  • Sr. Member
  • ****
  • Posts: 386
    • terrivellmann.tumblr.com
Re: Enemy Finding the player and follow him
« Reply #1 on: May 03, 2018, 08:09:22 AM »
I think this is a game design question first, playmaker question later.

There are many ways to create an Enemy AI, maybe you're just checking distance and activate the chase when the player is close enough, maybe its that but also when the player is within the right field of view. You could also use raycasts, but on some games it could be a tile logic or just showing up on the screen.

If you want to just do the distance, you can use the action Get Distance, and feed that value into a Float Compare. The chase could either be with a simple Move Towards or if you're using Unity's pathfinding you could se the Enemy Agent's target as the Player object.

Eduardo

  • Playmaker Newbie
  • *
  • Posts: 11
Re: Enemy Finding the player and follow him
« Reply #2 on: May 14, 2018, 11:57:04 AM »
Thanks Terri