Closed jmcmorris closed 2 months ago
Turns out there is already some logic for following inside https://github.com/LandSandBoat/server/blob/base/scripts/globals/follow.lua
I think it might make the most sense to combine these two since there is some nice logic for handling multiple followers (like we need to with Mother Globe) but it is also missing some functionality such as the runaway. I'm not positive the existing logic works with mobs following players/npcs either but this new follow logic does.
I have made an additional commit to the initial two that reworks the original follow logic: https://github.com/LandSandBoat/server/pull/5967/commits/95886fbd6ddad0c8081d0d3690ba5847c1fda0b2
I affirm:
What does this pull request do?
This is old code I wrote for Eden about 5 years ago. It adds a simple method for monsters to follow some target.
This is useful for many monsters such as:
Steps to test these changes
!gotoid 17506396
and observe pathing!hp 0
and they will properly adjust which mob they are followingAdditional steps taken from #3629