# NPC:AdvancePath

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

```lua
NPC:AdvancePath()
```

## Açıklama

NPC'yi yolunda bir sonraki ara noktaya ilerletir.

> **UYARI:** Bu fonksiyonu herhangi bir rotası olmayan bir NPC üzerinde çağırmak, oyunun anında çökmesine neden olur.

### Örnek

Scriptli NPC'nizin, bir sonraki ara noktaya ulaşmak için tam olarak düğümün (node) üzerine basmasını beklemeden ilerlemesini sağlar. Bu sayede NPC, gövdesi (hull) ara noktanın yakınına geldiğinde ilerleyebilir.

```lua
function ENT:OverrideMode(flInterval)
	local vecCurWaypoint = self:GetCurWaypointPos()
	if !vecCurWaypoint:IsZero() then
		local threshold = self:BoundingRadius() or 1
		local curDistance = self:GetPos():Distance(vecCurWaypoint)
		if curDistance < threshold then
			if !self:GetNextWaypointPos():IsZero() then
				self:AdvancePath()
			else
				self:ClearGoal()
				self:OnMovementComplete()
			end
		end
	end
end
```

- [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/NPC:AdvancePath
