# PathFollower

- **İngilizce aslı:** https://wiki.facepunch.com/gmod/PathFollower
- **Çeviri tarihi:** 2025-09-08

Bir NextBot NPC'si ve [player.CreateNextbot](https://gmod.tr/wiki/player.CreateNextBot) tarafından oluşturulan botlar için yol (path) nesnesi. [Path](https://gmod.tr/wiki/Global.Path) tarafından döndürülür.

## Metotlar

PathFollower:[Chase](https://gmod.tr/wiki/PathFollower:Chase)( [NextBot](https://gmod.tr/wiki/NextBot) bot, [Entity](https://gmod.tr/wiki/Entity) ent, [function](https://gmod.tr/wiki/function) generator = nil )

Belirtilen entity argümanına giden en kısa yolu hesaplar. PathFollower Nesnesi Chase tipinde olmalıdır. Follow tipindeki PathFollower nesneleri için [PathFollower:Compute](https://gmod.tr/wiki/PathFollower:Compute) kullanın.

[boolean](https://gmod.tr/wiki/boolean) PathFollower:[Compute](https://gmod.tr/wiki/PathFollower:Compute)( [NextBot](https://gmod.tr/wiki/NextBot) bot, [Vector](https://gmod.tr/wiki/Vector) goal, [function](https://gmod.tr/wiki/function) generator = nil )

A* algoritmasını kullanarak bot'tan 'goal' hedefine giden en kısa yolu hesaplar. Bu yalnızca PathFollower, Follow tipinde ise çalışır. Chase tipindeki PathFollower'lar için [PathFollower:Chase](https://gmod.tr/wiki/PathFollower:Chase)'e bakın.

PathFollower:[Draw](https://gmod.tr/wiki/PathFollower:Draw)()

Yolu çizer. Bu, hata ayıklama (debugging) amaçlıdır ve debugoverlay kullanır.

[table](https://gmod.tr/wiki/table) PathFollower:[FirstSegment](https://gmod.tr/wiki/PathFollower:FirstSegment)()

Yolun ilk segmentini (parçasını) döndürür.

[number](https://gmod.tr/wiki/number) PathFollower:[GetAge](https://gmod.tr/wiki/PathFollower:GetAge)()

Yolun oluşturulmasından bu yana geçen süreyi döndürür.

[table](https://gmod.tr/wiki/table) PathFollower:[GetAllSegments](https://gmod.tr/wiki/PathFollower:GetAllSegments)()

Verilen yolun tüm segmentlerini döndürür.

[Vector](https://gmod.tr/wiki/Vector) PathFollower:[GetClosestPosition](https://gmod.tr/wiki/PathFollower:GetClosestPosition)( [Vector](https://gmod.tr/wiki/Vector) position )

Yol üzerindeki bir pozisyona en yakın konumu döndürür.

[table](https://gmod.tr/wiki/table) PathFollower:[GetCurrentGoal](https://gmod.tr/wiki/PathFollower:GetCurrentGoal)()

Mevcut hedef verisini döndürür. Mevcut hedef geçersizse nil döndürebilir, örneğin [PathFollower:Update](https://gmod.tr/wiki/PathFollower:Update)'dan hemen sonra.

[table](https://gmod.tr/wiki/table) PathFollower:[GetCursorData](https://gmod.tr/wiki/PathFollower:GetCursorData)()

İmleç (cursor) verisini döndürür.

[number](https://gmod.tr/wiki/number) PathFollower:[GetCursorPosition](https://gmod.tr/wiki/PathFollower:GetCursorPosition)()

Yol üzerindeki mevcut ilerlemeyi döndürür.

[Vector](https://gmod.tr/wiki/Vector) PathFollower:[GetEnd](https://gmod.tr/wiki/PathFollower:GetEnd)()

Yolun bitiş pozisyonunu döndürür.

[number](https://gmod.tr/wiki/number) PathFollower:[GetGoalTolerance](https://gmod.tr/wiki/PathFollower:GetGoalTolerance)()

Hedefe ulaşıldığını varsaymak için ne kadar yaklaşılması gerektiğini döndürür.

[Entity](https://gmod.tr/wiki/Entity) PathFollower:[GetHindrance](https://gmod.tr/wiki/PathFollower:GetHindrance)()

[number](https://gmod.tr/wiki/number) PathFollower:[GetLength](https://gmod.tr/wiki/PathFollower:GetLength)()

Yolun toplam uzunluğunu döndürür.

[number](https://gmod.tr/wiki/number) PathFollower:[GetMinLookAheadDistance](https://gmod.tr/wiki/PathFollower:GetMinLookAheadDistance)()

Hareket hedefinin yol boyunca olması gereken minimum menzili döndürür.

[Vector](https://gmod.tr/wiki/Vector) PathFollower:[GetPositionOnPath](https://gmod.tr/wiki/PathFollower:GetPositionOnPath)( [number](https://gmod.tr/wiki/number) distance )

Yol üzerindeki bir mesafenin vektör pozisyonunu döndürür.

[Vector](https://gmod.tr/wiki/Vector) PathFollower:[GetStart](https://gmod.tr/wiki/PathFollower:GetStart)()

Yolun başlangıç pozisyonunu döndürür.

PathFollower:[Invalidate](https://gmod.tr/wiki/PathFollower:Invalidate)()

Mevcut yolu geçersiz kılar.

[boolean](https://gmod.tr/wiki/boolean) PathFollower:[IsValid](https://gmod.tr/wiki/PathFollower:IsValid)()

Yol geçerliyse `true` döndürür.

[table](https://gmod.tr/wiki/table) PathFollower:[LastSegment](https://gmod.tr/wiki/PathFollower:LastSegment)()

Yolun son segmentini (parçasını) döndürür.

PathFollower:[MoveCursor](https://gmod.tr/wiki/PathFollower:MoveCursor)( [number](https://gmod.tr/wiki/number) distance )

İmleci belirtilen mesafe kadar hareket ettirir. Mesafeyi ayarlayan bir fonksiyon için [PathFollower:MoveCursorTo](https://gmod.tr/wiki/PathFollower:MoveCursorTo)'ya bakın.

PathFollower:[MoveCursorTo](https://gmod.tr/wiki/PathFollower:MoveCursorTo)( [number](https://gmod.tr/wiki/number) distance )

İmleç pozisyonunu belirtilen mesafeye ayarlar. Göreceli mesafe için [PathFollower:MoveCursor](https://gmod.tr/wiki/PathFollower:MoveCursor)'a bakın.

PathFollower:[MoveCursorToClosestPosition](https://gmod.tr/wiki/PathFollower:MoveCursorToClosestPosition)( [Vector](https://gmod.tr/wiki/Vector) pos, [number](https://gmod.tr/wiki/number) type = 0, [number](https://gmod.tr/wiki/number) alongLimit = 0 )

Yolun imlecini, verilen vektöre kıyasla en yakın pozisyona taşır.

PathFollower:[MoveCursorToEnd](https://gmod.tr/wiki/PathFollower:MoveCursorToEnd)()

İmleci yolun sonuna taşır.

PathFollower:[MoveCursorToStart](https://gmod.tr/wiki/PathFollower:MoveCursorToStart)()

İmleci yolun başlangıcına taşır.

[table](https://gmod.tr/wiki/table) PathFollower:[NextSegment](https://gmod.tr/wiki/PathFollower:NextSegment)()

Yolun bir sonraki segmentini döndürür.

[table](https://gmod.tr/wiki/table) PathFollower:[PriorSegment](https://gmod.tr/wiki/PathFollower:PriorSegment)()

Yolun bir önceki segmentini döndürür.

PathFollower:[ResetAge](https://gmod.tr/wiki/PathFollower:ResetAge)()

[PathFollower:GetAge](https://gmod.tr/wiki/PathFollower:GetAge) tarafından alınan yaşı 0'a sıfırlar.

PathFollower:[SetGoalTolerance](https://gmod.tr/wiki/PathFollower:SetGoalTolerance)( [number](https://gmod.tr/wiki/number) distance )

Hedefe ulaşıldığını varsaymak için ne kadar yaklaşılması gerektiğini ayarlar.

PathFollower:[SetMinLookAheadDistance](https://gmod.tr/wiki/PathFollower:SetMinLookAheadDistance)( [number](https://gmod.tr/wiki/number) mindist )

Hareket hedefinin yol boyunca olması gereken minimum menzili ayarlar.

PathFollower:[Update](https://gmod.tr/wiki/PathFollower:Update)( [NextBot](https://gmod.tr/wiki/NextBot) bot )

Botu yol boyunca hareket ettirir. Oyuncu nextbot'larının yol boyunca ilerlemesi için CUserCmd:SetForwardMove gereklidir.

- [GMod Wiki ana sayfası](https://gmod.tr/wiki)

---

[Tüm sunucular](https://gmod.tr/) · [GmodTR Launcher](https://gmod.tr/launcher) · [Rehber](https://gmod.tr/rehber) · [GMod Wiki](https://gmod.tr/wiki) · [GmodTR nedir?](https://gmod.tr/hakkinda) · [Sunucu ekle](https://gmod.tr/sunucu-ekle) · [Discord](https://discord.gg/gmodtr)

Kaynak: https://gmod.tr/wiki/PathFollower
