Getting the End Attachment of a Pathfinding Link

I would like to know how to obtain the end attachment of a pathfinding link when it is used in a path. For example, if the NPC moves to Start Attachment, how would I know what the End Attachment is? This would be very useful so I don’t have to hard-code every single portal or ladder in my game.


In this image, I need to know the end attachment so that the teleporter will teleport NPCs to the the end attachment position. I could theoretically hard-code it in, but I was hoping there was an easier way because there will be multiple basic links like these across multiple maps (like 20 maps lol).

Did you ever figure this out? Cant find anyone talking about this

I haven’t looked into it personally, but you could probably have a dictionary of all the links, then loop through it and see which attachment is closest to the NPC. Based on which is closest, you would assume that’s the one they’re using and thus do logic based on it specifically. Certainly not foolproof but seems like it’d work for most use cases

1 Like