# NPC:SetMovementActivity

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

```lua
NPC:SetMovementActivity( number activity )
```

## Açıklama

NPC'nin hareket ederken kullandığı aktiviteyi ayarlar.

## Argümanlar

1. [number](https://gmod.tr/wiki/number) **activity**: Hareket aktivitesi, bakınız [ACT enum](https://gmod.tr/wiki/Enums/ACT).

### Örnek

Tüm NPC'lerin koşmak yerine yürümesini sağlar.

```lua
function GM:Think()
	for i, npc in ipairs( ents.FindByClass( "npc_*" ) ) do
		if IsValid( npc ) and npc:IsNPC() and npc:GetMovementActivity() ~= ACT_WALK then
			npc:SetMovementActivity( ACT_WALK )
		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:SetMovementActivity
