# NPC:NavSetWanderGoal

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

```lua
boolean NPC:NavSetWanderGoal( number xOffset, number yOffset )
```

## Açıklama

NPC'nin başıboş gezinmesi için x, y ofsetlerinde bir hedef belirler.

## Argümanlar

1. [number](https://gmod.tr/wiki/number) **xOffset**: X ofseti
2. [number](https://gmod.tr/wiki/number) **yOffset**: Y ofseti

## Döndürülen Değer

1. [boolean](https://gmod.tr/wiki/boolean): Yol oluşturma işleminin başarılı olup olmadığı.

### Örnek

Mevcut bir NPC'nin, hem x hem de y yönünde 100 birim ötedeki bir konuma doğru başıboş gezinmesini sağlar.

```lua
if IsValid( npc ) then
    npc:NavSetWanderGoal( 100, 100 )
    npc:SetSchedule( SCHED_IDLE_WANDER )
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:NavSetWanderGoal
