Garry's Mod Wiki

NPC:SetMaxLookDistance

  NPC:SetMaxLookDistance( number dist )

Just Added

This was just added in the latest version (2023.01.25). It might only be available on the Dev Branch right now.

Description

Sets NPC's max view distance. An NPC will not be able to see enemies outside of this distance.

Arguments

1 number dist
New maximum distance the NPC can see at. Default is 2048 and 6000 for long range NPCs such as the sniper.