Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Eduardo on May 02, 2018, 01:25:07 PM

Title: Enemy Finding the player and follow him
Post by: Eduardo 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
Title: Re: Enemy Finding the player and follow him
Post by: terri 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.
Title: Re: Enemy Finding the player and follow him
Post by: Eduardo on May 14, 2018, 11:57:04 AM
Thanks Terri