playMaker

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

Eduardo

  • Playmaker Newbie
  • *
  • Posts: 11
    • View Profile
Enemy Finding the player and follow him
« on: May 02, 2018, 10:25:07 AM »
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: 358
    • View Profile
    • terrivellmann.tumblr.com
Re: Enemy Finding the player and follow him
« Reply #1 on: May 03, 2018, 05: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
    • View Profile
Re: Enemy Finding the player and follow him
« Reply #2 on: May 14, 2018, 08:57:04 AM »
Thanks Terri