Zombie Pathfinding

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Jordan

Member
Jan 25, 2017
190
12
18
25
Scotland
I've been trying to wrap my head around this for hours with no luck,

I can get a zombie to pathfind to a location but i can't seem to get him to stop pathfinding even if i remove his AI and attack him he'll always pathfind to this 1 location.

Maybe someone who is smarter can try tackle it but basically the zombie needs to be able to pathfind from 1 location to another and must do the following

- Attack another zombie if in a 3 block radius of it
- Attack a player if the player attacks the zombie

If the zombie is attacked by a player then it'll follow the player until it's out of range lets say the distance between the player and the zombie is less than 5 then return the zombie to pathfind to that location

I've tried to do this but can't get the zombie to stop pathfind to the location.

I was using SkQuerys

code_language.skript:
make %[URL='http://skunity.com/types#LivingEntity']living entities[/URL]% pathfind to %[URL='http://skunity.com/types#Location']location[/URL]% with speed %[URL='http://skunity.com/types#Number']number[/URL]%

Would be great if someone could try tackle this problem, not to sure if it's just because i'm stupid or my skquery is bugged or what not -_- haha.