#Pathfinding Enemy NPC Help

1 messages · Page 1 of 1 (latest)

harsh jolt
#

Hey, If anyone is good at created pathfinding npcs, Id really appreciate some help.
Ive been working on one for a while, and its a bit buggy and laggy when I have lots of enemies.

The NPC should do the following:

  • Pathfind to the nearest player
  • If any walls are detected to be in the way, break them and continue
  • Deal damage when in range of player

However problems im dealing with are:

  • Npc will randomly stop
  • When having lots of enemies the game lags
  • Animations are laggy

Heres my script:

https://pastebin.com/eVEZ7WBw

obtuse sundial
jovial anchor
harsh jolt